idlastro / Math and Statistics: MRANDOMN

[Source code]

NAME
MRANDOMN
URPOSE
unction to draw NRAND random deviates from a multivariate normal
istribution with zero mean and covariance matrix COVAR.
UTHOR Brandon C. Kelly, Steward Obs., Sept. 2004
NPUTS
SEED - The random number generator seed, the default is IDL's
       default in RANDOMN()
COVAR - The covariance matrix of the multivariate normal
        distribution.    
PTIONAL INPUTS
NRAND - The number of randomn deviates to draw. The default is
        one.
UTPUT
The random deviates, an [NRAND, NP] array where NP is the
dimension of the covariance matrix, i.e., the number of
parameters.
PTIONAL OUTPUT
STATUS - status of the Cholesky decomposition.   If STATUS = 0 then 
    the computation was successful.  If STATUS > 0 then the 
    input covariance matrix is not positive definite  (see LA_CHOLDC),
    and MRANDOMN
    Note that if a STATUS keyword is supplied then no error message 
    will be printed.
EVISION HISTORY
Oct. 2013  -- Use LA_CHOLDC instead of CHOLDC to enable use of STATUS
      keyword.    W. Landsman