FUNCTION REFERENCE

xcov

Cross-covariance and autocovariance of real vectors.

Cross-covariance and autocovariance of real vectors.

Syntax

c = xcov(x)

Syntax

c = xcov(x, y)

Syntax

c = xcov(x, maxlag)

Syntax

c = xcov(x, y, maxlag, scale)

Syntax

[c, lags] = xcov(...)

xcorr of the sequences with their means removed: c = xcorr(x - mean(x), y - mean(y), ...). Arguments, lags, the scale options ('none', 'biased', 'unbiased', 'coeff') and the output orientation are those of xcorr.

Example

c = xcov([1 2 3 5])   % [-3.9375 -2.125 1.6875 8.75 1.6875 -2.125 -3.9375]

Example

[c, lags] = xcov([1 2 3 5], [2 0 1 1], 1, 'coeff')   % [0.4183 -0.2390 -0.2390], lags [-1 0 1]

Differences from MATLAB: only nonempty real vectors, as for xcorr.

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