The COV2CORR function is part of the IMLMLIB library. A correlation matrix estimates the correlations of centered and standardized variables, where each variable has been scaled by its standard deviation. The COV2CORR function converts a covariance matrix into a correlation matrix, as in the following example:
S = {1.0 1.0 8.1,
1.0 16.0 18.0,
8.1 18.0 81.0 };
R = Cov2Corr(S);
print R;
The variances of the three variables are found on the diagonal of
. Equivalently, the square roots of the diagonal elements are the standard deviations. The COV2CORR function scales
so that
, where
is the diagonal matrix of standard deviations.