%% Design Multiband Minimum-Order Arbitrary-Magnitude Filter
% Use fdesign.arbmag to design a multiband minimum order filter.
% Place the notches at 0.25\pi and 0.55\pi rad/sample.

d = fdesign.arbmag('B,F,A,R');
d.NBands = 5;
d.B1Frequencies = [0 0.2];
d.B1Amplitudes = [1 1];
d.B1Ripple = 0.25;
d.B2Frequencies = 0.25;
d.B2Amplitudes = 0;
d.B3Frequencies = [0.3 0.5];
d.B3Amplitudes = [1 1];
d.B3Ripple = 0.25;
d.B4Frequencies = 0.55;
d.B4Amplitudes = 0;
d.B5Frequencies = [0.6 1];
d.B5Amplitudes = [1 1];
d.B5Ripple = 0.25;
Hd = design(d,'equiripple');

%
% Visualize the frequency response of the resulting filter.

fvtool(Hd)

% Copyright 2012 The MathWorks, Inc.