The call colcov(x)
returns a matrix containing the covariance of the columns of
x, where x is a real or double-precision matrix.
The return value has the same type as x.
Each column of x corresponds to a random variable,
and each row of x corresponds to a realization.
The row and column dimensions of the return value are equal to the
column dimension of x.
If C is the covariance of x,
1 ---- _ _ C = ----- > (x - x ) (x - x ) i,jN - 1 ---- k,iik,jj k = 1 where N is the number of rows in x and
_ 1 ---- x = --- > x jN ---- k,j k = 1
If both x and y are vectors of equal length,
returns that covariance between the two vectors.
To be specific this is the return value is equal to the return value of
where the first column of X contains the elements
of the vector x and the second column of X
contains the elements of y.