poissrnd function issue: weird histogram
2 views (last 30 days)
Show older comments
Saurabh Talele on 21 Sep 2017
Edited: Saurabh Talele on 22 Sep 2017
I tried to produce 10^6 poisson distributed random numbers and when i looked at the histogram, it had either some gaps or shoots depending upon the bin size... can anyone exlpain whats happening here?
t = zeros(1000000,1);
for i = 1:1000000
t(i,1) = poissrnd(100);
José-Luis on 21 Sep 2017
Edited: José-Luis on 21 Sep 2017
The loop is unnecessary:
Works as expected.
Find more on Poisson Distribution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!