%% Second-Order Sections from Zero-Pole-Gain Parameters
% Design a 5th-order Butterworth lowpass filter using the function butter with output expressed in zero-pole-gain form. Specify the cutoff frequency to be one-fifth of the Nyquist frequency. Convert the result to second-order sections. Visualize the magnitude response.

[z,p,k] = butter(5,0.2);
sos = zp2sos(z,p,k)
fvtool(sos)

% Copyright 2015 The MathWorks, Inc.