<< nan_xcorr2 Data Correlation and Covariance nan_xcovf >>

NaN Toolbox >> NaN Toolbox > Data Correlation and Covariance > nan_xcov

nan_xcov

Compute covariance at various lags[=correlation(x-mean(x),y-mean(y))].

Calling Sequence

[c, lag] = nan_xcov (X [, Y] [, maxlag] [, scale])

Parameters

X:

input vector

Y:

if specified, compute cross-covariance between X and Y,

maxlag:

is specified, use lag range [-maxlag:maxlag],

otherwise use range [-n+1:

n-1].

Scale:

lags:

vector of lags

c:

covariance for each lag in the range

Description

Returns the covariance for each lag in the range, plus an optional vector of lags.

Authors


<< nan_xcorr2 Data Correlation and Covariance nan_xcovf >>