Butterworth filter prototype
Frequency Response of a Butterworth Analog Filter
Design a 9th-order Butterworth analog lowpass filter. Display its magnitude and phase responses.
[z,p,k] = buttap(9); % Butterworth filter prototype [num,den] = zp2tf(z,p,k); % Convert to transfer function form freqs(num,den) % Frequency response of analog filter
n — Order of Butterworth filter
positive integer scalar
Order of Butterworth filter, specified as a positive integer scalar.
z — Zeros
Zeros of the system, returned as a matrix.
z contains the
numerator zeros in its columns.
z is an empty matrix because there
are no zeros.
p — Poles
Poles of the system, returned as a column vector.
the pole locations of the denominator coefficients of the transfer function.
k — Gains
Gains of the system, returned as a scalar.
k contains the gains
for each numerator transfer function.
z = ; p = exp(sqrt(-1)*(pi*(1:2:2*n-1)/(2*n)+pi/2)).'; k = real(prod(-p));
buttap returns zeros, poles, and gain
and k) in MATLAB®. However, the generated C/C++ code for
buttap returns only
p and gain
k since zeros
always an empty matrix.
Butterworth filters are characterized by a magnitude response that is maximally flat in
the passband and monotonic overall. In the lowpass case, the first 2
derivatives of the squared magnitude response are zero at ω = 0. The squared
magnitude response function is
corresponding to a transfer function with poles equally spaced around a circle in the left
half plane. The magnitude response at the cutoff angular frequency ω0
is always regardless of the filter order.
ω0 to 1 for a normalized result.
 Parks, T. W., and C. S. Burrus. Digital Filter Design. New York: John Wiley & Sons, 1987.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Introduced before R2006a