poissrnd
- poissrnd(λ) returns a random number following Poisson distribution with mean λ
- poissrnd(λ, n, m) returns a n x m matrix with random number following Poisson distribution with mean λ
- poissrnd(λ, n) is equivalent to poissrnd(λ, n, n)
Examples
> poissrnd(10)#
11
> poissrnd(10,2,3)#
17 12 10
10 13 5
> histfit(poissrnd(4, 500, 1), struct('xAxisName', 'k', 'yAxisName', 'p(x=k)'))
[ans:1x1 struct]