lognrnd

Generate random data from a normal distribution.

Syntax

rnd=lognrnd()

rnd=lognrnd(mu,sigma)

rnd=lognrnd(mu,sigma,r,c)

Inputs

mu
Mean (default = 0).
Type: double
Dimension: scalar | vector | matrix
sigma
Standard Deviation (default = 1).
Type: double
Dimension: scalar | vector | matrix
r,c
Number of matrix rows and columns.
Type: integer
Dimension: scalar

Outputs

rnd
Random data.

Examples

Single value lognrnd example:
mu = 5;
sigma = 3;
rnd = lognrnd(mu,sigma);
rnd = 4862.1
Vector lognrnd example:
mu = 5;
sigma = 3;
r = 1;
c = 5;
rnd = lognrnd(mu,sigma,r,c);
rnd = [Matrix] 1 x 5
4862.1 633.6 364.56 234.88 4.4529

Comments

The random number generator can be initialized using rand.