FUNCTION REFERENCE

cpsd

Cross power density from overlapping windowed transforms.

Cross power density from overlapping windowed transforms.

Syntax

[pxy,w] = cpsd(x,y,window,noverlap,nfft)

Syntax

[pxy,f] = cpsd(x,y,window,noverlap,nfft,fs)

Uses mean(conj(FFT(x))*FFT(y)), preserving cross-spectrum phase. Defaults, empty placeholders, scalar or vector window, frequency ranges, PSD/power scaling, and incomplete-tail handling match pwelch: symmetric Hamming, eight target segments, 50 percent overlap, nfft at least 256, no detrending. Real inputs default to one-sided; complex inputs to two-sided. Columns must match. Without fs, frequency is radians/sample and density is power per radian/sample; fs selects Hz and power/Hz. No outputs plots cross-spectrum magnitude in dB.

Example

[p,w] = cpsd(1:64,filter([1 0.5],1,1:64));

Differences from MATLAB: unequal signal lengths and channel counts are rejected; no confidence intervals or frequency-vector grids. FFT, work, and memory limits match pwelch.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.