how to include a 'probability' when coding.
조회 수: 1 (최근 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개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!