%% Impulse Response Length — Filter Objects
% Design IIR Butterworth and FIR equiripple filters for data sampled at 1 kHz. The passband frequency is 100 Hz and the stopband frequency is 150 Hz. The passband ripple is 0.5 dB and there is 60 dB of stopband attenuation. Obtain dfilt objects for the filters and compare the filter impulse response sequence lengths.

d = fdesign.lowpass('Fp,Fst,Ap,Ast',100,150,0.5,60,1000);
Hd1 = design(d,'butter');
Hd2 = design(d,'equiripple');
len = impzlength([Hd1 Hd2])

% Copyright 2012 The MathWorks, Inc.