freqrespopts
Create an options object for frequency response estimate
Description
uses the current settings in the filter System object™ to create an options object. This object contains options for frequency
response estimation. You pass the opts
= freqrespopts(sysobj
)opts
object as an input argument to
the freqrespest
function to specify values for the
input parameters.
freqrespopts
allows you to use the same settings for
freqrespest
with multiple filters without specifying all of the
parameters as input arguments to freqrespest
.
Examples
Set Frequency Response Options
This example uses the freqrespopts
function to set options which are used by the freqrespest
function. 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 when using the freqrespest
function with different filter objects..
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",SystemObject=true)
hd = dsp.SOSFilter with properties: Structure: 'Direct form II' CoefficientSource: 'Property' Numerator: [18x3 double] Denominator: [18x3 double] HasScaleValues: true ScaleValues: [0.2535 0.2535 0.2437 0.2437 0.2353 0.2353 0.2283 0.2283 0.2226 0.2226 0.2181 0.2181 0.2148 0.2148 0.2126 0.2126 0.2116 0.2116 1] Use get to show all properties
hd2 = design(d,"cheby2",SystemObject=true)
hd2 = dsp.SOSFilter with properties: Structure: 'Direct form II' CoefficientSource: 'Property' Numerator: [9x3 double] Denominator: [9x3 double] HasScaleValues: true ScaleValues: [0.7226 0.7226 0.6446 0.6446 0.5277 0.5277 0.3810 0.3810 0.2932 1] Use get to show all properties
opts = freqrespopts(hd)
opts = struct with fields: FreqPoints: 'All' 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 = struct with fields: FreqPoints: 'All' NFFT: 256 NormalizedFrequency: false Fs: 1500 SpectrumRange: 'Whole' CenterDC: true
With the opts
object configured as needed, use it as an input argument for the freqrespest
function.
[h2,w2] = freqrespest(hd2,20,opts); [h1,w1] = freqrespest(hd,20,opts);
Input Arguments
sysobj
— Input filter
filter System object
Output Arguments
opts
— Options object
pseudospectrum
object
Options object which contains the options for frequency response estimation,
returned as a pseudospectrum
object. You pass the
opts
object as an input argument to the freqrespest
function to specify values for input parameters.
Version History
Introduced in R2011aR2024b: dsp.BiquadFilter
object warns
The dsp.BiquadFilter
object issues a warning and will be removed in a
future release. Use the dsp.SOSFilter
object
instead. For more information on how to replace your existing code, see the
Compatibility Considerations section in the dsp.BiquadFilter
reference page.
R2024b: Support for dsp.DCBlocker
object
Starting in R2024b, this function supports the dsp.DCBlocker
object.
R2023b: Support for dsp.ParallelFilter
and dsp.Delay
Objects
Starting in R2023b, the freqrespestopts
analysis function supports
the dsp.ParallelFilter
and the dsp.Delay
objects.
R2023b: dsp.BiquadFilter
object will be removed
The dsp.BiquadFilter
object will be removed in a future release. Use
the dsp.SOSFilter
object
instead.
See Also
freqrespest
| noisepsd
| noisepsdopts
| scale
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)