Parameters

Description

If x is a nobs-by-1 matrix,
then cov(x) returns the variance of x,
normalized by nobs-1.

If x is a nobs-by-nvar matrix,
then cov(x) returns the nvar-by-nvar covariance matrix of the
columns of x, normalized by nobs-1.
Here, each column of x is a variable and
each row of x is an observation.

If x and y are two nobs-by-1 matrices,
then cov(x, y) returns the 2-by-2 covariance matrix of x and
y, normalized by nobs-1, where nobs is the number of observations.

cov(x, 0) is the same as cov(x) and
cov(x, y, 0) is the same as cov(x, y).
In this case, if the population is from a normal distribution,
then C is the best unbiased estimate of the covariance matrix.

cov(x, 1) and cov(x, y, 1) normalize by nobs.
In this case, C is the second moment matrix of the
observations about their mean.