exprnd
Generate random data from an exponential distribution.
Syntax
rnd=exprnd(lambda)
rnd=exprnd(lambda,r,c)
Inputs
- lambda
- Mean.
- r,c
- Number of matrix rows and columns.
Outputs
- rnd
- Random data.
Examples
Single value exprnd example:
lambda = 5;
rnd = exprnd(lambda)
rnd = 3
lambda = 5;
r = 1;
c = 5;
rnd = exprnd(lambda,r,c)
rnd = [Matrix] 1 x 5
3 2.6141 1.676 0.84644 2.5312
Comments
The random number generator can be initialized using rand.