Random numbers from Poisson distribution
generates an array of random numbers from the Poisson distribution with the scalar rate
parameter r
= poissrnd(lambda
,sz1,...,szN
)lambda
, where sz1,...,szN
indicates the
size of each dimension.
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 user interface for random number generation.