MATLAB Answers

0

How to generate a random integer between two bounds?

Asked by Cantor Set on 4 Sep 2019
Latest activity Answered by Alex Mcaulley on 4 Sep 2019
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 Comments

Sign in to comment.

1 Answer

Answer by Alex Mcaulley on 4 Sep 2019
 Accepted Answer

randi([4,500])

  0 Comments

Sign in to comment.