poissrnd
Generate random data from a Poisson distribution.
Syntax
rnd=poissrnd(lambda)
rnd=poissrnd(lambda,r,c)
Inputs
- lambda
- Mean.
- r,c
- Number of matrix rows and columns.
Outputs
- rnd
- Random data.
Examples
Single value poissrnd example:
lambda = 5;
rnd = poissrnd(lambda)
rnd = 11
lambda = 5;
r = 1;
c = 5;
rnd = poissrnd(lambda,r,c)
rnd = [Matrix] 1 x 5
11 3 8 5 2
Comments
The random number generator can be initialized using rand.