Products & Services Solutions Academia Support User Community Company

Learn more about Filter Design Toolbox   

freqrespopts - freqrespest parameters and values

Syntax

opts = freqrespopts(hd)

Description

opts = freqrespopts(hd) uses the settings in filter hd to create an object opts that contains parameters and values for estimating the filter frequency response. You pass opts as an input argument to freqrespest to specify values for the input parameters.

With freqrespopts you can use the same settings for freqrespest with multiple filters without having to specify all of the parameters as input arguments to freqrespest.

Examples

This example shows freqrespopts in use for setting options for freqrespest. hd and hd2 are bandpass filters that use different design methods. The opts object makes it easier to set the same conditions for the frequency response estimate in freqrespest.

d=fdesign.bandpass('fst1,fp1,fp2,fst2,ast1,ap,ast2',...
0.25,0.3,0.45,0.5,60,0.1,60);

hd=design(d,'butter');
hd.arithmetic='fixed';
hd2=design(d,'cheby2')
hd2.arithmetic='fixed';
opts=freqrespopts(hd)
 
opts =
 
                   NFFT: 512
    NormalizedFrequency: true
                     Fs: 'Normalized'
          SpectrumRange: 'Half'
               CenterDC: false

opts.NFFT=256; % Same as set(opts,'nfft',256).
opts.NormalizedFrequency=false;
opts.fs=1.5e3;
opts.CenterDC=true
 
opts =
 
                   NFFT: 256
    NormalizedFrequency: false
                     Fs: 1500
          SpectrumRange: 'Whole'
               CenterDC: true

With opts configured as needed, use it as an input argument for freqrespest.

[h2,w2]=freqrespest(hd2,20,opts);
[h1,w1]=freqrespest(hd,20,opts);

See Also

freqrespest, noisepsd, noisepsdopts, norm, scale

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

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