How to generate a random number from a user defined discrete uniform distribution in Matlab ?
4 ビュー (過去 30 日間)
古いコメントを表示
Gayan Lankeshwara
2020 年 5 月 17 日
コメント済み: Gayan Lankeshwara
2020 年 5 月 17 日
Hi there,
Imagine that I have written the following code in MATLAB.
numItems = 100 ;
Levels = [0.25, 0.5, 0.75, 1.0]
prob = [.25, .25, .25, .25]
% prob can be any set of probability values.
I want to generate a discrete uniform distribution with values Levels for a vector of numItems elements considering the values of prob.
Can anyone please help me with this ?
Thanks.
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!