Info
This question is closed. Reopen it to edit or answer.
poisson random distributoin with zeros
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
the cyclist
on 15 Oct 2019
Edited: the cyclist
on 15 Oct 2019
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 Comment
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!