Azzera filtri
Azzera filtri

How to generate a random integer between two bounds?

131 visualizzazioni (ultimi 30 giorni)
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!

Risposta accettata

Alex Mcaulley
Alex Mcaulley il 4 Set 2019
randi([4,500])

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by