<< CL_cor2cov Utilities CL_covDraw >>

CelestLab >> Utilities > CL_cov2cor

CL_cov2cor

Covariance to correlation matrix

Calling Sequence

[cor,sd] = CL_cov2cor(cov)

Description

Parameters

cov:

Covariance matrix (NxNxK)

cor:

Correlation matrix (NxNxK)

sd:

Standard deviations vectors (NxK)

Authors

See also

Examples

// Random covariance matrix :
N=6; K=2;
mat = rand(N,N,K,key="normal");
cov = mat'*mat;  // symetrical
[cor,sd] = CL_cov2cor(cov);

// Retrieving the covariance :
cov2 = CL_cor2cov(cor,sd) ;
<< CL_cor2cov Utilities CL_covDraw >>