This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Wishart random numbers


W = wishrnd(Sigma,df)
W = wishrnd(Sigma,df,D)
[W,D] = wishrnd(Sigma,df)


W = wishrnd(Sigma,df) generates a random matrix W having the Wishart distribution with covariance matrix Sigma and with df degrees of freedom. The inverse of W has the Inverse Wishart distribution with parameters Tau = inv(Sigma) and df degrees of freedom.

W = wishrnd(Sigma,df,D) expects D to be the Cholesky factor of Sigma. If you call wishrnd multiple times using the same value of Sigma, it's more efficient to supply D instead of computing it each time.

[W,D] = wishrnd(Sigma,df) returns D so you can provide it as input in future calls to wishrnd.

This function defines the parameter Sigma so that the mean of the output matrix is Sigma*df

Introduced before R2006a

Was this topic helpful?