FUNCTION REFERENCE
mscohere
Magnitude-squared coherence from averaged auto and cross spectra.
Magnitude-squared coherence from averaged auto and cross spectra.
Syntax
[cxy,w] = mscohere(x,y,window,noverlap,nfft)Syntax
[cxy,f] = mscohere(x,y,window,noverlap,nfft,fs)Returns abs(Pxy)^2/(Pxx*Pyy), between zero and one, with NaN where either autospectrum is zero. Defaults and segment options match pwelch: symmetric Hamming, eight target segments, 50 percent overlap, nfft at least 256, no detrending, one-sided for real inputs. Frequency is radians/sample without fs, Hz with fs. Matching columns are processed independently. Trailing range and scaling flags are accepted; scaling cancels in the ratio. With no outputs, plots coherence versus frequency.
Example
[c,w] = mscohere(1:64,1:64);Differences from MATLAB: no confidence intervals, frequency-vector grids, or unequal input lengths; finite arrays and the pwelch resource limits apply.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.