Summation of Random Numbers
조회 수: 2 (최근 30일)
이전 댓글 표시
How would you go about writing a code to solve a summations of randomly generated intergers, say r= to an equation, until the sum is greater than a number, say x.
댓글 수: 0
채택된 답변
Walter Roberson
2019년 10월 13일
I would use a while loop.
while summation <= x
%add a random integer to the summation
end
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!