firls - RLS filter from specification object

Syntax

hd = firls(d)

Description

hd = firls(d) designs a discrete-time FIR filter using a least-squares error minimization method. Only halfband and interpolation specifications objects with Specification of 'n,tw' or 'pl,tw' work as specifications objects for firls.

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 filter specification object type — halfband or interpolator.

Examples

Here are two examples of using firls to design filters. The first example returns a single-rate halfband filter using 120 as the filter order..

d = fdesign.halfband('n,tw',120,.04); 
hd = firls(d);

Now use firls to design a multirate halfband interpolator filter.

d = fdesign.interpolator(2,'pl,tw',60,.04); % 60 is the polyphase 
                                            % length.
hm = firls(d);

See Also

equiripple, kaiserwin

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS