%% Plot the Impulse Response of a Lowpass Elliptic Filter
% Create a discrete-time filter for a fourth-order, lowpass elliptic filter with a cutoff frequency of 0.4 times the Nyquist frequency. Use a second-order sections structure to resist quantization errors. Plot the first 50 samples of the impulse response, along with the reference impulse response.

d = fdesign.lowpass(.4,.5,1,80);

%
% Create a design object for the prototype filter. Use ellip to design a minimum order discrete-time biquad filter.

biquad = design(d,'ellip','Systemobject',true);

%
% Plot the impulse response.

impz(biquad);
axis([1 75 -0.2 0.35])

% Copyright 2012 The MathWorks, Inc.