how to simulate 10000 samples from a multinomial distribution with p1=0.5,p2=0.3p3=0.2
조회 수: 2 (최근 30일)
이전 댓글 표시
how to simulate 10000 samples from a multinomial distribution with p1=0.5,p2=0.3p3=0.2
댓글 수: 0
채택된 답변
Star Strider
2015년 3월 28일
편집: Star Strider
2015년 3월 28일
n = 1E+5; % Number Of Trials
p = [0.5, 0.3, 0.2]; % Vector Of Probabilities
r = mnrnd(n, r); % Output: Random Numbers
Does this do what you want?
댓글 수: 0
추가 답변 (0개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!