[Master Index]
[Index for /tools/hpmatlab/toolbox/signal]
psd
(/tools/hpmatlab/toolbox/signal/psd.m)
Function Synopsis
[Pxx, Pxxc, f] = psd(P1, P2, P3, P4, P5, P6, P7)
Help text
PSD Power Spectral Density estimate
Pxx = PSD(X,NFFT,Fs,WINDOW) estimates the Power Spectral Density of
signal vector X using Welch's averaged periodogram method. X is
divided into overlapping sections, each of which is detrended, then
windowed by the WINDOW parameter, then zero-padded to length NFFT.
The magnitude squared of the length NFFT DFTs of the sections are
averaged to form Pxx. Pxx is length NFFT/2+1 for NFFT even, (NFFT+1)/2
for NFFT odd, or NFFT if the signal X is complex. If you specify a
scalar for WINDOW, a Hanning window of that length is used. Fs is the
sampling frequency which doesn't effect the spectrum estimate but is
used for scaling of plots.
[Pxx,F] = PSD(X,NFFT,Fs,WINDOW,NOVERLAP) returns a vector of frequen-
cies the same size as Pxx at which the PSD is estimated, and overlaps
the sections of X by NOVERLAP samples.
[Pxx, Pxxc, F] = PSD(X,NFFT,Fs,WINDOW,NOVERLAP,P) where P is a scalar
between 0 and 1, returns the P*100% confidence interval for Pxx.
PSD(X,...,DFLAG), where DFLAG can be 'linear', 'mean' or 'none',
specifies a detrending mode for the prewindowed sections of X.
DFLAG can take the place of any parameter in the parameter list
(besides X) as long as it is last, e.g. PSD(X,'none');
PSD with no output arguments plots the PSD in the current figure window,
with confidence intervals if you provide the P parameter.
The default values for the parameters are NFFT = 256 (or LENGTH(X),
whichever is smaller), NOVERLAP = 0, WINDOW = HANNING(NFFT), Fs = 2,
P = .95, and DFLAG = 'linear'. You can obtain a default parameter by
leaving it off or inserting an empty matrix [], e.g. PSD(X,[],10000).
See also CSD, COHERE, TFE
ETFE, SPA, and ARX in the Identification Toolbox.
Cross-Reference Information
This function calls
- abs /tools/hpmatlab/toolbox/matlab/elfun/abs.m
- any /tools/hpmatlab/toolbox/matlab/ops/any.m
- detrend /tools/hpmatlab/toolbox/signal/detrend.m
- disp /tools/hpmatlab/toolbox/matlab/general/disp.m
- else /tools/hpmatlab/toolbox/matlab/lang/else.m
- elseif /tools/hpmatlab/toolbox/matlab/lang/elseif.m
- end /tools/hpmatlab/toolbox/matlab/lang/end.m
- error /tools/hpmatlab/toolbox/matlab/lang/error.m
- eval /tools/hpmatlab/toolbox/matlab/lang/eval.m
- fft /tools/hpmatlab/toolbox/matlab/datafun/fft.m
- fix /tools/hpmatlab/toolbox/matlab/elfun/fix.m
- for /tools/hpmatlab/toolbox/matlab/lang/for.m
- grid /tools/hpmatlab/toolbox/matlab/plotxy/grid.m
- i /tools/hpmatlab/toolbox/matlab/elmat/i.m
- if /tools/hpmatlab/toolbox/matlab/lang/if.m
- imag /tools/hpmatlab/toolbox/matlab/elfun/imag.m
- isempty /tools/hpmatlab/toolbox/matlab/ops/isempty.m
- length /tools/hpmatlab/toolbox/matlab/general/length.m
- log10 /tools/hpmatlab/toolbox/matlab/elfun/log10.m
- max /tools/hpmatlab/toolbox/matlab/datafun/max.m
- nargchk /tools/hpmatlab/toolbox/matlab/lang/nargchk.m
- nargin /tools/hpmatlab/toolbox/matlab/elmat/nargin.m
- nargout /tools/hpmatlab/toolbox/matlab/elmat/nargout.m
- newplot /tools/hpmatlab/toolbox/matlab/graphics/newplot.m
- optargs /tools/hpmatlab/toolbox/signal/optargs.m
- plot /tools/hpmatlab/toolbox/matlab/plotxy/plot.m
- psdchk /tools/hpmatlab/toolbox/signal/psdchk.m
- rem /tools/hpmatlab/toolbox/matlab/elfun/rem.m
- size /tools/hpmatlab/toolbox/matlab/general/size.m
- sqrt /tools/hpmatlab/toolbox/matlab/elfun/sqrt.m
- xlabel /tools/hpmatlab/toolbox/matlab/plotxy/xlabel.m
- ylabel /tools/hpmatlab/toolbox/matlab/plotxy/ylabel.m
- zeros /tools/hpmatlab/toolbox/matlab/elmat/zeros.m
This function is called by
- moddemo /tools/hpmatlab/toolbox/signal/moddemo.m
Produced by mat2html on Wed Feb 8 12:25:18 EST 1995
Cross-Directory links are: ON