How can I simulate a binomial distribution without using a matlab command?
10 次查看(过去 30 天)
显示 更早的评论
Hello all,
Do some of you know how to simulate a Bin(n,p) distribution in matlab by only using the command binornd(1,p) (bernoulli distribution)? I am aware that I can do it with binornd(n,p) but I'm looking for another way.
Since the bernoulli is a special case of a binomial distribution I used the binornd command for simulating a bernoulli. Perhaps there is a better way for simulating a bernoulli distribution?
Can someone help me with this?
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!