[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
This function is called by

Produced by mat2html on Wed Feb 8 12:25:18 EST 1995
Cross-Directory links are: ON