How to generate an array of poisson distributed (without any built-in function) 0 and 1 of a known lambda value?
4 views (last 30 days)
Show older comments
I want an array of 0 and 1 where the occurrences of the event are limited to '1' for a certain time of observation(bin). The values should be Poisson distributed, where I can input the lambda value. How can I code this on MATLAB without use any Poisson's built-in function?
4 Comments
John D'Errico
on 29 Oct 2020
Edited: John D'Errico
on 29 Oct 2020
Do you have such a low Poisson rate that you KNOW there will never be anything larger than a 1? If you can never have more than 1 arrival, then it is not a true Poisson. So are you really sure this is a Poisson process? As Jeff points out, you can reduce this to a simple binomial sampling based on your statement. Just decide the rate you want to see.
Accepted Answer
Ameer Hamza
on 29 Oct 2020
Read about inverse transform sampling() https://en.wikipedia.org/wiki/Inverse_transform_sampling . You will at least need to use rand().
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!