designmethods - Methods available for designing filter from specification object

Syntax

m = designmethods(d)
m = designmethods(d,'default')
m = designmethods(d,type)
m = designmethods(d,'full')

Description

m = designmethods(d) returns a list of the design methods available for the filter specification object d with its Specification. When you change the Specification for a filter specification object, the methods available to design filters from the object change.

Here are all the design methods and the filters they produce.

Design Method

Filter Result

butter

IIR

cheby1

IIR

cheby2

IIR

ellip

IIR

equiripple

FIR

firls

FIR

freqsamp

Frequency-sampled FIR

ifir

Interpolated FIR

iirlinphase

IIR filter with linear phase

iirlpnorm

IIR filter from an arbitrary magnitude specifications object. Compare to iirls.

iirls

IIR filter from an arbitrary magnitude and phase specifications object. Compare to iirlpnorm.

kaiserwin

FIR with Kaiser window

lagrange

Multirate filter with fractional delay

multistage

Multistage filter that cascades multiple filters

window

FIR with windowed impulse response

m = designmethods(d,'default') returns the default design method for the filter specification object d and its current Specification.

m = designmethods(d,type) returns either the FIR or IIR design methods that apply to d, as specified by the type string, either fir or iir. By default, designmethods returns all the valid design methods when you omit the type string.

m = designmethods(d,'full') returns the full name for each of the available design methods. For example, designmethods with the full argument returns Butterworth for the butter method.

Examples

Construct a lowpass filter specification object and determine the design methods available to design a filter from the object.

d=fdesign.lowpass('n,fc',10,12000,48000)
 
d =
 
            Response: 'Lowpass'
       Specification: 'N,Fc'
         Description: {'Filter Order';'Cutoff Frequency'}
 NormalizedFrequency: false
                  Fs: 48000
         FilterOrder: 10
             Fcutoff: 12000

designmethods(d)


Design Methods for class fdesign.lowpass (N,Fc):


window

hd=window(d)
 
hd =
 
     FilterStructure: 'Direct-Form FIR'
          Arithmetic: 'double'         
           Numerator: [1x11 double]    
    PersistentMemory: false

Now change the Specification string for d to 'fp,fst,ap,ast' and determine the design methods that apply to your modified specifications object.

set(d,'specification','fp,fst,ap,ast');
d
 
d =
 
               Response: 'Lowpass'      
          Specification: 'Fp,Fst,Ap,Ast'
            Description: {4x1 cell}     
    NormalizedFrequency: false          
                     Fs: 48000          
                  Fpass: 10800          
                  Fstop: 13200          
                  Apass: 1              
                  Astop: 60
                                               
m2 = designmethods(d)
m3 = designmethods(d, 'iir')
m4 = designmethods(d, 'iir', 'full')

m2 = 

    'butter'
    'cheby1'
    'cheby2'
    'ellip'
    'equiripple'
    'ifir'
    'kaiserwin'
    'multistage'


m3 = 

    'butter'
    'cheby1'
    'cheby2'
    'ellip'


m4 = 

    'Butterworth'
    'Chebyshev Type I'
    'Chebyshev Type II'
    'Elliptic'

Now you can get specific help on a particular design method for the specifications object. This example returns the help for the first design method for the m2 set of methods — butter.

help(d,m2{1})

This is the same as help(d,'butter').

See Also

butter, cheby1, cheby2, designopts, ellip, equiripple, kaiserwin, multistage

  


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