Products & Services Solutions Academia Support User Community Company

Learn more about Signal Processing Toolbox   

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 MethodFilter Result
butterIIR
cheby1IIR
cheby2IIR
ellipIIR
equirippleFIR
firlsFIR
freqsampFIR
kaiserwinFIR
window (filter design method)FIR

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

m2 = 

    'butter'
    'cheby1'
    'cheby2'
    'ellip'
    'equiripple'
    'kaiserwin'

m3

m3 = 

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

m4

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

design, designopts, fdesign.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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