Equiripple single-rate or multirate FIR filter from specification object

mfilt objects will be removed in a future release. Refer to the reference page for a specific mfilt object to see its recommended replacement.


hd = design(d,'equiripple')
hd = design(d,'equiripple',designoption,value,designoption,


hd = design(d,'equiripple') designs an equiripple FIR digital filter or multirate filter using the specifications supplied in the object d. Equiripple filter designs minimize the maximum ripple in the passbands and stopbands.

hd is either a dfilt object (a single-rate digital filter) or an mfilt object (a multirate digital filter) depending on the Specification property of the filter specification object d and the specifications object type — halfband or interpolator.

When you use equiripple with Nyquist filter specification objects, you might encounter design cases where the filter design does not converge. Convergence errors occur mostly at large filter orders, or small transition widths, or large stopband attenuations. These specifications, alone or combined, can cause design failures. For more information, refer to fdesign.nyquist in the online Help system.

hd = design(d,'equiripple',designoption,value,designoption,
returns an equiripple FIR filter where you specify design options as input arguments.

To determine the available design options, use designopts with the specification object and the design method as input arguments as shown.


For complete help about using equiripple, refer to the command line help system. For example, to get specific information about using equiripple with d, the specification object, enter the following at the MATLAB prompt.



Here is an example of designing a single-rate equiripple filter from a halfband filter specification object. Notice the help command used to learn about the options for the specification object and method.

d = fdesign.halfband('tw,ast',0.1,80);
hd = design(d,'equiripple','stopbandshape','flat');

Displaying the filter in FVTool shows the equiripple nature of the filter.

equiripple also designs multirate filters. This example generates a halfband interpolator filter.

d = fdesign.interpolator(2); % Interpolation factor = 2.
hd = design(d,'equiripple');

This final example designs an equiripple filter with a direct-form structure by specifying the filterstructure argument. To set the design options for the filter, use the designopts method and options object opts.

d = fdesign.lowpass('fp,fst,ap,ast');

    Note:   The MaxPhase design option for equripple FIR filters is currently only available for lowpass, highpass, bandpass, and bandstop filters.

Introduced in R2011a

Was this topic helpful?