Statistics Toolbox | ![]() ![]() |
Random matrices from the lognormal distribution
Syntax
Description
R = lognrnd(MU,SIGMA)
generates lognormal random numbers with parameters MU and SIGMA. Vector or matrix inputs for MU and SIGMA must have the same size, which is also the size of R
. A scalar input for MU or SIGMA is expanded to a constant matrix with the same dimensions as the other input.
R = lognrnd(MU,SIGMA,m)
generates lognormal random numbers with parameters MU and SIGMA, where m is a 1-by-2 vector that contains the row and column dimensions of R.
R = lognrnd(MU,SIGMA,m,n)
generates lognormal random numbers with parameters MU and SIGMA, where scalars m and n are the row and column dimensions of R.
Example
r = lognrnd(0,1,4,3) r = 3.2058 0.4983 1.3022 1.8717 5.4529 2.3909 1.0780 1.0608 0.2355 1.4213 6.0320 0.4960
Reference
[1] Evans, M., N. Hastings, and B. Peacock, Statistical Distributions, Second Edition, John Wiley and Sons, 1993. p. 102-105.
See Also
random
, logncdf
, logninv
, lognpdf
, lognstat
![]() | lognpdf | lognstat | ![]() |