This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Convert standard deviation and correlation to covariance


ExpCovariance = corr2cov(ExpSigma,ExpCorrC)



Vector of length n with the standard deviations of each process. n is the number of random processes.


(Optional) n-by-n correlation coefficient matrix. If ExpCorrC is not specified, the processes are assumed to be uncorrelated, and the identity matrix is used.


corr2cov converts standard deviation and correlation to covariance.

ExpCovariance is an n-by-n covariance matrix, where n is the number of processes.

ExpCov(i,j) = ExpCorrC(i,j)*ExpSigma(i)*ExpSigma(j) 


collapse all

This example shows how to convert standard deviation and correlation to covariance.

ExpSigma = [0.5  2.0];

ExpCorrC = [1.0 -0.5
           -0.5  1.0];

ExpCovariance = corr2cov(ExpSigma, ExpCorrC)
ExpCovariance = 2×2

    0.2500   -0.5000
   -0.5000    4.0000

Introduced before R2006a