lognrnd
Generate random data from a normal distribution.
Syntax
rnd=lognrnd(mu,sigma)
rnd=lognrnd(mu,sigma,r,c)
Inputs
- mu
- Mean (default = 0).
- sigma
- Standard Deviation (default = 1).
- r,c
- Number of matrix rows and columns.
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.