$LastChangedDate: 27-Juil-2011 $

# CL_cov2cor

Covariance to correlation matrix

## Calling Sequence

       [cor,sd] = CL_cov2cor(cov)

## Description

- Computes the correlation matrix and the standard deviations vector from the covariance matrix.

  The correlation matrix and standard deviation vector are built as follows:

  - cor(i,i) = 1

  - cor(i,j) = cov(i,j) / (sd(i) * sd(j))

  - sd(i) = cov(i,i)^(1/2)

## Parameters

cov:

  Covariance matrix (NxNxK)

cor:

  Correlation matrix (NxNxK)

sd:

  Standard deviations vectors (NxK)

## Authors

- CNES - DCT/SB

## See also

- CL_cor2cov

## 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) ;