Info

この質問は閉じられています。 編集または回答するには再度開いてください。

poisson random distributoin with zeros

1 回表示 (過去 30 日間)
Mohamed Ayman
Mohamed Ayman 2019 年 10 月 15 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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)

回答 (1 件)

the cyclist
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 件のコメント
Mohamed Ayman
Mohamed Ayman 2019 年 10 月 15 日
thank you for your help

Community Treasure Hunt

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

Start Hunting!

Translated by