Signal Processing Toolbox |
Spectral estimation parameter information
Syntax
Description
Hopts = dspopts.
returns a DSP options object optsobj
Hopts
of type optsobj
. This DSP options object contains optional parameter information for the specified type of optsobj
.
You create options objects via methods on other objects. For example,
returns a spectrum object Hs
options object. You can change the values of the Hopts
object and then use this modified options object as an input to the psd
method of a spectrum object Hs
:
Options Objects
An options object (optsobj
) for dspopts
contain optional parameter values for the particular optsobj
. Available optsobj
s for dspopts
are as follows:
spectrum
-- Spectrum options for any spectrum estimation method object. The spectrum object method to create this options object is psdopts
and msspectrumopts
. See spectrum
for more information.
Properties and valid values of a dspopts.spectrum
object are as follows:
'NFFT'
-- integer number of FFT points
'NormalizedFrequency'
-- whether frequency is normalized (true
) or not (false
)
'Fs'
-- sampling frequency, used only when 'NormalizedFrequency'
is false
. If 'NormalizedFrequency'
is true
, the value of Fs
is 'Normalized'
.
'SpectrumType'
-- 'Onesided'
for half the Nyquist interval or 'Twosided'
for the whole Nyquist interval.
pseudospectrum
-- Pseudospectrum options for spectrum.music
and spectrum.eigenvector
objects. The spectrum object method to create this options object is pseudospectrumopts
. See spectrum
for more information.
Properties and valid values of a dspopts.pseudospectrum
object are as follows:
'NFFT'
-- integer number of FFT points
'NormalizedFreqeuncy'
--whether frequency is normalized (true
) or not (false
)
'Fs'
-- sampling frequency, used only when 'NormalizedFrequency'
is false
. If 'NormalizedFrequency'
is true
, the value of Fs
is 'Normalized'
.
'SpectrumRange'
-- 'Half'
for half the Nyquist interval or 'Whole'
for the whole Nyquist interval.
Modifying a DSPOPTS Object
To set specific properties, use
where 'property1'
, 'property2'
, and property
are the specific property names.
To view the options for a property use set
without specifying a value
Note that you must use single quotation marks around the property name if you are not using the dot method.
Another way to change an object's properties is by using the inspect
command, which opens the Property Inspector window where you can edit any property, except dynamic properties.
Examples
Define a fourth order auto-regressive model and view its power spectral density using the Burg algorithm. Use dspopts
to specify the FFT length and sampling frequency.
randn('state',1); x=randn(100,1); x=filter(1,[1 1/2 1/3 1/4 1/5],x);%Fourth order AR filter Hs=spectrum.burg; %Fourth order AR model Hopts = dspopts.spectrum; set(Hs,'FFTLength','UserDefined'); set(Hopts,'NFFT',512); set(Hopts,'Fs',1000); psd(Hs,x,Hopts)
See Also
spectrum
, spectrum.burg
, spectrum.cov
, spectrum.eigenvector
, spectrum.mcov
, spectrum.mtm
, spectrum.music
, spectrum.periodogram
, spectrum.welch
, spectrum.yulear
dspfwiz | ellip |
© 1994-2005 The MathWorks, Inc.