How to generate a random integer between two bounds?

144 vues (au cours des 30 derniers jours)
Cantor Set
Cantor Set le 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!

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by