Obtaining the Covariance & Correlation Coefficient Matrices for a given Data Matrix.
a =
6 8 9
8 5 8
7 0 5
>> cov(a)
ans =
1.0000 -1.5000 -0.5000
-1.5000 16.3333 8.3333
-0.5000 8.3333 4.3333
>> corrcoef(a)
ans =
1.0000 -0.3712 -0.2402
-0.3712 1.0000 0.9905
-0.2402 0.9905 1.0000