<< moc_corrcov Matlab/Octave Compatibility toolbox moc_deal >>

Matlab/Octave Compatibility toolbox >> Matlab/Octave Compatibility toolbox > moc_cov

moc_cov

Compute the covariance matrix.

Calling Sequence

c = moc_cov (x)
c = moc_cov (x,opt)
c = moc_cov (x,y)
c = moc_cov (x,y,opt)

Description

If each row of xand y is an observation, and each column is a variable, then the (i, j)-th entry of moc_cov (x, y)} is the covariance between the i-th variable in x and the j-th variable in y. If called with one argument, compute moc_cov (x, x)}, the covariance between the columns of x.

The argument opt determines the type of normalization to use. Valid values are

normalize with N-1, provides the best unbiased estimator of the covariance [default]

normalize with N, this provides the second moment around the mean

Authors


Report an issue
<< moc_corrcov Matlab/Octave Compatibility toolbox moc_deal >>