Correlation to covariance matrix
cov = CL_cor2cov(cor,sd)
Computes the covariance matrix from the correlation matrix and the standard deviations.
The covariance matrix is built as follows:
- cov(i,i) = sd(i)^2
- cov(i,j) = cor(i,j) * sd(i) * sd(j)
Correlation matrix (NxNxK)
Standard deviations vector (NxK)
Covariance matrix (NxNxK)
CNES - DCT/SB
// 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) ; | ![]() | ![]() |