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:
'rad/sample'
(default)'Hz'
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 frequencypsdplot(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
freqzplot |
Plot frequency response data. |
pburg |
Estimate the power spectral density using the Burg method. |
pcov |
Estimate the power spectral density using the covariance method. |
peig |
Estimate the pseudospectrum using the eigenvector method. |
periodogram |
Estimate the power spectral density using a periodogram. |
pmcov |
Estimate the power spectral density using the modified covariance method. |
pmusic |
Estimate the pseudospectrum with the MUSIC algorithm. |
pwelch |
Estimate the power spectral density using Welch's method. |
pyulear |
Estimate the power spectral density using the Yule-Walker AR method. |
![]() | prony | pulstran | ![]() |