how to include a 'probability' when coding.
조회 수: 3(최근 30일)
표시 이전 댓글
I wanted to include the concept of 'probability' when coding. For example, giving me a reward of +1 only 60% of the time. How do in incorporate this '60 %' idea?
댓글 수: 1
Jonas
2021년 4월 22일
you could generate a random number between 1 and 10 and add 1 if your random number is <=6
채택된 답변
추가 답변(0개)
참고 항목
범주
Find more on MATLAB Environments in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!