Random numbers with specific sum and varying maximum
2 ビュー (過去 30 日間)
古いコメントを表示
How can I generate random numbers with a specific sum and a specific minimum (zero) but varying maximum? I already tried randfixedsum function but the maximum is fixed not varying.
0 件のコメント
回答 (1 件)
Jeff Miller
2021 年 4 月 13 日
How about first picking the maximum "thismax" randomly from whatever distribution you want, and then using randfixedsum to generate the remainder "desired_total-thismax" the remaining n-1 numbers?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!