How to generate random number within a range?

조회 수: 1 (최근 30일)
VIJAY
VIJAY 2020년 1월 27일
댓글: Stephen23 2020년 1월 27일
I want to generate a random number between 0.2 to 1

채택된 답변

Stephen23
Stephen23 2020년 1월 27일
>> 0.2+(1-0.2)*rand()
ans =
0.85178
  댓글 수: 2
VIJAY
VIJAY 2020년 1월 27일
thank you
Stephen23
Stephen23 2020년 1월 27일
@VIJAY: please don't forget to accept my answer!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by