Main Content

iirls

Least-squares IIR filter from specification object

Syntax

hd = design(d,'iirls','SystemObject',true)
hd = design(d,'iirls',designoption,value,designoption,value,...,'SystemObject',true)

Description

hd = design(d,'iirls','SystemObject',true) designs a least-squares filter specified by the filter specification object d.

Note

The iirls algorithm might not be well behaved in all cases. Experience is your best guide to determining if the resulting filter meets your needs. When you use iirls to design a filter, review the filter carefully to ensure that it is appropriate for your use.

hd = design(d,'iirls',designoption,value,designoption,value,...,'SystemObject',true) returns a least-squares IIR 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.

designopts(d,'method')

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

help(d,'iirls')

Examples

collapse all

Starting from an arbitrary magnitude and phase design object d, generate a complex bandpass filter of order = 5. To make the example a little easier to do, use the default values for F, and H, the frequency vector and the complex desired frequency response.

d = fdesign.arbmagnphase('N,F,H',5)
d = 
  arbmagnphase with properties:

               Response: 'Arbitrary Magnitude and Phase'
          Specification: 'N,F,H'
            Description: {3x1 cell}
    NormalizedFrequency: 1
            FilterOrder: 5
            Frequencies: [-1 -0.9969 -0.9939 -0.9908 -0.9878 -0.9847 -0.9817 -0.9786 -0.9755 -0.9725 -0.9694 -0.9664 -0.9633 -0.9602 -0.9572 -0.9541 -0.9511 -0.9480 -0.9450 -0.9419 -0.9388 -0.9358 -0.9327 -0.9297 -0.9266 -0.9235 ... ] (1x655 double)
           FreqResponse: [-0.0030 - 0.0105i -0.0031 - 0.0107i -0.0032 - 0.0108i -0.0032 - 0.0110i -0.0033 - 0.0112i -0.0034 - 0.0114i -0.0035 - 0.0116i -0.0036 - 0.0118i -0.0036 - 0.0120i -0.0037 - 0.0122i -0.0038 - 0.0124i ... ] (1x655 double)

filtObj = design(d,'iirls',SystemObject=true);
freqz(filtObj)

Version History

Introduced in R2011a