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.


Inverse Wishart random numbers


W = iwishrnd(Tau,df)
W = iwishrnd(Tau,df,DI)
[W,DI] = iwishrnd(Tau,df)


W = iwishrnd(Tau,df) generates a random matrix W from the inverse Wishart distribution with parameters Tau and df. The inverse of W has the Wishart distribution with covariance matrix Sigma = inv(Tau) and with df degrees of freedom. Tau is a symmetric and positive definite matrix.

W = iwishrnd(Tau,df,DI) expects DI to be the transpose of the inverse of the Cholesky factor of Tau, so that DI'*DI = inv(Tau), where inv is the MATLAB® inverse function. DI is lower-triangular and the same size as Tau. If you call iwishrnd multiple times using the same value of Tau, it is more efficient to supply DI instead of computing it each time.

[W,DI] = iwishrnd(Tau,df) returns DI so you can use it as an input in future calls to iwishrnd.

Note that different sources use different parametrizations for the inverse Wishart distribution. This function defines the parameter tau so that the mean of the output matrix is Tau/(df-d-1) where d is the dimension of Tau.

Introduced before R2006a