| Statistics Toolbox | Search  Help Desk |
| mvnrnd | Examples See Also |
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 is the number of rows inr.
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