MATLAB Answers

How to generate a random integer between two bounds?

조회 수: 30(최근 30일)
Hello,
I want to generate a random integer between two integers
Suppose the upper bound UP=500 and the lower bound LB=4 how to generate a random integer between these 2 bounds
Thank you!

  댓글 수: 0

로그인 to comment.

채택된 답변

Alex Mcaulley
Alex Mcaulley 4 Sep 2019
randi([4,500])

  댓글 수: 0

로그인 to comment.

추가 답변(0개)

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by