Signal Processing Toolbox | ![]() ![]() |
Plot power spectral density (PSD) data
Syntax
psdplot(Pxx,w) psdplot(Pxx,w,'units
') psdplot(Pxx,w,'units
','yscale
') psdplot(Pxx,w,'units
','yscale
','title
')
Description
psdplot(Pxx,w)
plots the power spectral density data contained in the vector Pxx at the frequencies specified in the vector w
. The vectors Pxx and w
must have the same length. The magnitude of the data vector Pxx is plotted in dB per radians per sample versus frequency w
on one plot. The units for frequency on the plots are rad/sample.
psdplot(Pxx,w,'
displays the frequency units according to the string 'units
')
units
'. This string can be either:
psdplot(Pxx,w,'
displays the spectral density magnitude units according to the string 'units
','yscale
')
yscale
'. This string can be either:
'db'
(default), for plotting the PSD in dB per units of frequency
'linear'
, for plotting the PSD in units of power per units of frequency
psdplot(Pxx,w,'
uses the contents of the string units
','yscale
','title
')
'title'
as the title of the plot.
Examples
t = 0:0.001:0.3; x = cos(2*pi*t*200) + randn(size(t)); [Pxx,w] = periodogram(x,[],'twosided',512); psdplot(Pxx,w,'','','Sample PSD Plot')
See Also
pburg
, pcov
, peig
, periodogram
, pmcov
, pmusic
, pwelch
, pyulear
![]() | prony | pulstran | ![]() |