%% Design Lowpass Filter
% Design an elliptic digital filter with lowpass frequency response.
% Construct a lowpass filter specification object using fdesign.lowpass. Specify the filter order, passband edge frequency, stopband edge frequency, and the passband ripple of the filter.

designSpecs = fdesign.lowpass('n,fp,fst,ap',6,20,25,.8,80);

% Determine the available design methods. To design an elliptic filter, pick ellip.

designmethods(designSpecs,'SystemObject',true)

% Use the design function to design the filter. Pass 'ellip' and the specifications given by the variable designSpecs, as input arguments.

ellipLowpass = design(designSpecs,'ellip','SystemObject',true)

% Use fvtool to visualize the lowpass frequency response.

fvtool(ellipLowpass)

%
% Copyright 2012 The MathWorks, Inc.