Multivariate t random numbers
R = mvtrnd(C,df,cases)
R = mvtrnd(C,df)
R = mvtrnd(C,df,cases) returns
a matrix of random numbers chosen from the multivariate t distribution,
C is a correlation matrix.
the degrees of freedom and is either a scalar or is a vector with
p is the number of columns in
then the output
t represent a row of
Then the distribution of
t is that of a vector
having a multivariate normal distribution with mean 0, variance 1,
and covariance matrix
C, divided by an independent
chi-square random value having
df degrees of freedom.
The rows of
R are independent.
C must be a square, symmetric and positive
definite matrix. If its diagonal elements are not all 1 (that is,
C is a covariance matrix rather than a correlation
transform it to a correlation matrix before generating the random
R = mvtrnd(C,df) returns
a single random number from the multivariate t distribution.
Generate random numbers from a multivariate t distribution with correlation parameters
SIGMA = [1 0.8;0.8 1] and 3 degrees of freedom.
rng default; % For reproducibility SIGMA = [1 0.8;0.8 1]; R = mvtrnd(SIGMA,3,100);
Plot the random numbers.