Info
此问题已关闭。 请重新打开它进行编辑或回答。
poisson random distributoin with zeros
1 次查看(过去 30 天)
显示 更早的评论
i want to generat a poisson random vector with mean 2400 and its diminsion(1000,1) and distribut it randomly in a zeros vector(80000,1)
0 个评论
回答(1 个)
the cyclist
2019-10-15
编辑:the cyclist
2019-10-15
If you have the Statistics and Machine Learning Toolbox, then
BIG = 80000;
SMALL = 1000;
MEAN = 2400;
idx = randsample(1:BIG,SMALL);
output = zeros(BIG,1);
output(idx) = poissrnd(MEAN,SMALL,1);
1 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!