필터 지우기
필터 지우기

How do I create a random integer number binomial distributed between two values?

조회 수: 4 (최근 30일)
Hi All, as from subject I would like to know how to generate a random integer number binomial distributed between two values. Is there any built-in function ? Thanks

채택된 답변

the cyclist
the cyclist 2018년 3월 21일
If you have the Statistics and Machine Learning Toolbox, you can use binornd. (You might need to add or multiply the result, depending exactly which integers you want.)
If you do not have this toolbox, there are other tricks you can do using core MATLAB.
  댓글 수: 4
amatlabr
amatlabr 2018년 3월 21일
So if my range is between 0 and 1000 --> binornd(1000,p) Otherwise if my range is between 10 and 1000 --> 10+binornd(9990,p)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by