Statistics Toolbox | ![]() ![]() |
Random matrices from the multivariate normal distribution.
Syntax
r = mvnrnd(mu,SIGMA,cases)
Description
r = mvnrnd(mu,SIGMA,cases)
returns a matrix of random numbers chosen from the multivariate normal distribution with mean vector mu and covariance matrix SIGMA. cases specifies the number of rows in r
.
SIGMA is a symmetric positive definite matrix with size equal to the length of mu.
Example
mu = [2 3]; sigma = [1 1.5; 1.5 3]; r = mvnrnd(mu,sigma,100); plot(r(:,1),r(:,2),'+')
See Also
normrnd
![]() | multcompare | mvtrnd | ![]() |