Digital Domain
[b,a] = butter(n,Wn) designs an order n lowpass digital Butterworth filter with cutoff frequency
Wn. It returns the filter coefficients in length n+1 row vectors b and a, with coefficients in
descending powers of z.
Cutoff frequency is that frequency where the magnitude response of the filter is . For
butter, the normalized cutoff frequency Wn must be a number between 0 and 1, where 1
corresponds to the Nyquist frequency, π radians per sample.
If Wn is a two-element vector, Wn = [w1 w2], butter returns an order 2*n digital bandpass filter
with passband w1 <ω< w2.
[b,a] = butter(n,Wn,'ftype') designs a highpass or bandstop filter, where the string 'ftype' is either:
'high' for a highpass digital filter with cutoff frequency Wn
'stop' for an order 2*n bandstop digital filter if Wn is a two-element vector,
Wn = [w1 w2]. The stopband is w1 <ω< w2.
With different numbers of output arguments, butter directly obtains other realizations of the filter.
To obtain zero-pole-gain form, use three output arguments as shown below.
[z,p,k] = butter(n,Wn) or
[z,p,k] = butter(n,Wn,'ftype') returns the zeros and poles in length n column vectors z and p, and
the gain in the scalar k.
Analog Domain
[b,a] = butter(n,Wn,'s') designs an order n lowpass analog Butterworth filter with cutoff
frequency Wn rad/s. It returns the filter coefficients in the length n+1 row vectors b and a, in
descending powers of s, derived from the transfer function
butter's cutoff frequency Wn must be greater than 0 rad/s.
If Wn is a two-element vector with w1 < w2, butter(n,Wn,'s') returns an order 2*n bandpass
analog filter with passband w1 <ω< w2.
[b,a] = butter(n,Wn,'ftype','s') designs a highpass or bandstop filter.
With different numbers of output arguments, butter directly obtains other realizations of the
analog filter. To obtain zero-pole-gain form, use three output arguments as shown below.