%% Stopband Shape and Decay
% Create an FIR equiripple filter with a passband frequency of 0.2\pi rad/sample, a stopband frequency of 0.25\pi rad/sample, a passband ripple of 1 dB, and a stopband attenuation of 60 dB. Design the filter with a 20 dB/rad/sample linear stopband.

D = fdesign.lowpass('Fp,Fst,Ap,Ast',0.2,0.25,1,60);
Hd = design(D,'equiripple','StopbandShape','linear','StopbandDecay',20);

%
% Visualize the frequency response of the filter.

fvtool(Hd)

% Copyright 2012 The MathWorks, Inc.