How to generate a random decimal number between 1.0 and 1.52?
조회 수: 1 (최근 30일)
이전 댓글 표시
rand([1.0,1]);
May I know why this is not working?
댓글 수: 0
채택된 답변
Ameer Hamza
2020년 10월 29일
편집: Ameer Hamza
2020년 10월 29일
You can generate them by scaling and translating the output of rand()
range = [1.0,1.52];
x = rand()*diff(range)+range(1)
댓글 수: 2
추가 답변 (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!