Categories &

Functions List

Function Reference: lognrnd

statistics: r = lognrnd (mu, sigma)
statistics: r = lognrnd (mu, sigma, rows)
statistics: r = lognrnd (mu, sigma, rows, cols, …)
statistics: r = lognrnd (mu, sigma, [sz])

Random arrays from the lognormal distribution.

r = lognrnd (mu, sigma) returns an array of random numbers chosen from the lognormal distribution with mean parameter mu and standard deviation parameter sigma, each corresponding to the associated normal distribution. The size of r is the common size of mu, and sigma. A scalar input functions as a constant matrix of the same size as the other inputs. Both parameters must be reals and sigma > 0. For sigma <= 0, NaN is returned.

Both parameters must be reals and sigma > 0. For sigma <= 0, NaN is returned.

When called with a single size argument, lognrnd returns a square matrix with the dimension specified. When called with more than one scalar argument, the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The size may also be specified with a row vector of dimensions, sz.

Further information about the lognormal distribution can be found at https://en.wikipedia.org/wiki/Log-normal_distribution

See also: logncdf, logninv, lognpdf, lognfit, lognlike, lognstat

Source Code: lognrnd