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!