Info

This question is closed. Reopen it to edit or answer.

poisson random distributoin with zeros

1 view (last 30 days)
Mohamed Ayman
Mohamed Ayman on 15 Oct 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
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)

Answers (1)

the cyclist
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);

Community Treasure Hunt

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

Start Hunting!