求教在matlab中生成服从正态分布的随机数

来源:百度知道 编辑:UC知道 时间:2024/06/17 23:45:39

>> help normrnd

NORMRND Random matrices from normal distribution.
R = NORMRND(MU,SIGMA) returns a matrix of random numbers chosen
from the normal distribution with parameters MU and SIGMA.

The size of R is the common size of MU and SIGMA if both are matrices.
If either parameter is a scalar, the size of R is the size of the other
parameter. Alternatively, R = NORMRND(MU,SIGMA,M,N) returns an M by N
matrix.

Y = randn(m,n)
生成均值为0 方差为1 m×n的由正态分布随机数构成的矩阵

help randn