How to generate a random integer between two bounds?

142 ビュー (過去 30 日間)
Cantor Set
Cantor Set 2019 年 9 月 4 日
回答済み: Alex Mcaulley 2019 年 9 月 4 日
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!

採用された回答

Alex Mcaulley
Alex Mcaulley 2019 年 9 月 4 日
randi([4,500])

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by