Random numbers with specific sum and varying maximum
조회 수: 11 (최근 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!