matlab产生正态分布样本

mvnrnd - Multivariate normal random numbers

This MATLAB function returns an n-by-d matrix R of random vectors chosen from
the multivariate normal distribution with mean MU, and covariance SIGMA.

假设n维,

(1)R = mvnrnd(MU,SIGMA)

返回一个n维向量
(2)r = mvnrnd(MU,SIGMA,cases)

返回cases个n维向量

例子:

 mu=[2 3];

SIGMA=[1 1.5;1.5 3];

r=mvnrnd(mu,SIGMA,100);

plot(r(:,1),r(:,2),'+');

 

posted on 2015-07-21 13:33  一动不动的葱头  阅读(794)  评论(0编辑  收藏  举报

导航