I am relatively new to signal processing, and have always used MATLAB's designfilt option for my signal processing needs. Recently, however, I have seen people just using MATLAB's butter function. We all primarily just analyze EEG signals. I am just curious as to what makes them do this, as I currently don't see a major difference between the two aforementioned functions.

Again, I am pretty new to signal processing.


The function butter, as the name indicates, is used to construct the Butterworth IIR filter.

The function designfilt can be used to design the Butterworth filter as well, but you can design the other type filters with this function.

What type filter you need depends on your application. For example, the Butterworth filter rolls off more slowly around the cutoff frequency than the Chebyshev filter or the Elliptic filter, and it may decide your selection.

From the point of view of a coder, the use of designfilt can be preferable even when constructing the Butterworld filter. The function uses a name-value syntax and enables one to create a digitalFilter object:

d = designfilt(resp,Name,Value)

, d is the digitalFilter object. The digitalFilter object bundles all the parameters of a linear filter into a single container. The object digitalFilter is immutable, and after it is created, you can edit it only with the Filter Design Assistant that you open with the command designfilt(d).

On the other hand, the syntax of butter is simpler, the filter type stands out, and the function explicitly returns the matrix of coefficients.

But the most prominent feature of butter is that, using the syntax

[___] = butter(___,'s')

with the option 's' indicated (contrast it with default 'z' used for the digital filter design), butter returns the matrix of coefficients for the analog filter design -- which, by definition, the digitalFilter object cannot readily provide.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.