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),'+');

上一篇:android 53 ContentProvider内容提供者


下一篇:牛客网 Wannafly挑战赛 C 列一列 简单题 (题目有点坑)