%% Design an IIR Filter
% Design a notching comb filter with 8 notches, and a notch bandwidth of 0.02 referenced to a -3 dB level.
% Create a comb filter design specification object using the fdesign.comb function and specify these design parameters.

combSpecs = fdesign.comb('notch','N,BW',8,0.02);

% Design the notching comb filter using the design function. The resulting filter is a dsp.IIRFilter System object™. For details on how to apply this filter on streaming data, refer to dsp.IIRFilter.

iirFilt = design(combSpecs,'Systemobject',true)

% View magnitude response of the designed filter using fvtool.

fvtool(iirFilt)

%
%
% Copyright 2012 The MathWorks, Inc.