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