%% Transfer Function of Biquad Filter
% Compute the transfer function of a biquad filter using the tf function.
% Create a fourth-order, lowpass biquadratic filter object with a normalized cutoff frequency of 0.4.

[z,p,k] = ellip(4,1,60,0.4);    % Set up the filter
[s,g] = zp2sos(z,p,k);
biquad = dsp.BiquadFilter(s,g,'Structure','Direct form I')

%
% Compute the transfer function of the designed biquadratic filter. The tf function returns the numerator and the denominator coefficient vectors of the filter.

[num,den] = tf(biquad)

% Copyright 2018 The MathWorks, Inc.