[Master Index] [Index for /tools/hpmatlab/toolbox/signal]

csd

(/tools/hpmatlab/toolbox/signal/csd.m)


Function Synopsis

[Pxy, Pxyc, f] = csd(P1, P2, P3, P4, P5, P6, P7, P8)

Help text

 CSD	Cross Spectral Density estimate
	Pxy = CSD(X,Y,NFFT,Fs,WINDOW) estimates the Cross Spectral Density of 
	signal vectors X and Y using Welch's averaged periodogram method.  X and
	Y are divided into overlapping sections, each of which is detrended, 
	then windowed by the WINDOW parameter, then zero-padded to length NFFT.
	The products of the length NFFT DFTs of the sections of X and Y are 
	averaged to form Pxy.  Pxy is length NFFT/2+1 for NFFT even, (NFFT+1)/2
	for NFFT odd, or NFFT if the either X or Y 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 cross spectrum estimate 
	but is used for scaling of plots.

	[Pxy,F] = CSD(X,Y,NFFT,Fs,WINDOW,NOVERLAP) returns a vector of frequen-
	cies the same size as Pxy at which the CSD is estimated, and overlaps
	the X and Y sections NOVERLAP samples.

	[Pxy, Pxyc, F] = CSD(X,Y,NFFT,Fs,WINDOW,NOVERLAP,P) where P is a scalar
	between 0 and 1, returns the P*100% confidence interval for Pxy.

	CSD(X,Y,...,DFLAG), where DFLAG can be 'linear', 'mean' or 'none', 
	specifies a detrending mode for the prewindowed sections of X and Y.
	DFLAG can take the place of any parameter in the parameter list
	(besides X and Y) as long as it is last, e.g. CSD(X,Y,'none');
	
	CSD with no output arguments plots the CSD 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. CSD(X,Y,[],10000).

	See also PSD, COHERE, TFE
	ETFE, SPA, and ARX in the Identification Toolbox.

Cross-Reference Information

This function calls

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