syntax for random number
조회 수: 3 (최근 30일)
이전 댓글 표시
i need a syntax that generate one number in random from a range of numbers.
Can anyone tell me the syntax,
this is a python function random.randrange(50, 500, 10) i need the function which works in matlab
댓글 수: 0
답변 (4개)
madhan ravi
2019년 4월 8일
https://in.mathworks.com/help/matlab/ref/rand.html - see under Topics , you will find lot of resources
댓글 수: 0
Steven Lord
2019년 4월 10일
Take a look at the randi or randperm functions.
If you need to generate numbers from a set that contains non-integer values, or a set that is not consecutive integers, use those functions to generate an index and use linear indexing to extract the appropriate numbers from the set.
댓글 수: 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!