lognrnd
Lognormal random numbers
📝Syntax
r = lognrnd(mu, sigma)
r = lognrnd(mu, sigma, sz)
r = lognrnd(mu, sigma, sz1, ..., szN)
📥Input Arguments
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.
📤Output Arguments
Parameter Description
r array: random values.
📄Description

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.

💡Examples
rng(0);
r = lognrnd(0, 1, [2 3]);
🔗See Also
lognpdflognstat
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub