%% Zero-Phase Response of Elliptic Filter
% Design a 10th-order elliptic lowpass IIR filter with a normalized passband frequency of 0.4π rad/sample, a passband ripple of 0.5 dB, and a stopband attenuation of 20 dB. Display the zero-phase response of the filter on 512 frequency points around the whole unit circle.

d = designfilt('lowpassiir','FilterOrder',10,'PassbandFrequency',0.4, ...
    'PassbandRipple',0.5,'StopbandAttenuation',20,'DesignMethod','ellip');
zerophase(d,512,'whole')

%
% Create the same filter using ellip. Plot its zero-phase response.

[b,a] = ellip(10,0.5,20,0.4);
zerophase(b,a,512,'whole')

% Copyright 2012 The MathWorks, Inc.