Random numbers from Poisson distribution
or
r
= poissrnd(lambda
,sz1,...,szN
)
generates an r
= poissrnd(lambda
,[sz1,...,szN
])sz1
-by-⋯-by-szN
array containing random
numbers from the Poisson distribution with the scalar rate parameter
lambda
.
poissrnd
is a function specific to Poisson distribution.
Statistics and Machine Learning Toolbox™ also offers the generic function random
, which supports various probability distributions. To use
random
, specify the probability distribution name and its
parameters. Alternatively, create a PoissonDistribution
probability distribution object and pass the object as an
input argument. Note that the distribution-specific function
poissrnd
is faster than the generic function
random
.
To generate random numbers interactively, use randtool
, a random number generation user interface.