How to generate a random integer between two bounds?

146 Ansichten (letzte 30 Tage)
Cantor Set
Cantor Set am 4 Sep. 2019
Beantwortet: Alex Mcaulley am 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!

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by