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: [1x655 double]
           FreqResponse: [1x655 double]

fvt = design(d,'iirls','SystemObject',true);
fvtool(fvt,'freq');
legend('Magnitude','phase');

Figure Filter Visualization Tool - Magnitude Response (dB) and Phase Response contains an axes and other objects of type uitoolbar, uimenu. The axes with title Magnitude Response (dB) and Phase Response contains an object of type line. This object represents Magnitude.

Introduced in R2011a