r = normrnd(mu, sigma)
r = normrnd(mu, sigma, sz)
r = normrnd(mu, sigma, sz1, ..., szN)
| Parameter | Description |
|---|---|
| mu | real scalar or array: mean. |
| sigma | real scalar or array: standard deviation. |
| sz | size vector or size scalars for the output. |
| Parameter | Description |
|---|---|
| r | array: random values. |
normrnd generates random numbers from normal distributions using Nelson's global random generator.
Scalar parameters are expanded to the requested output size. Negative standard deviations produce NaN values.
rng(0);
r = normrnd(0, 1, 3, 4);
r2 = normrnd([0 10], [1 2]);
| Version | Description |
|---|---|
| 2.0.0 | initial version |