How can I generate random natural numbers between min and max range?

1 回表示 (過去 30 日間)
byungkeuk cho
byungkeuk cho 2020 年 4 月 1 日
コメント済み: byungkeuk cho 2020 年 4 月 1 日
I would like to to gererate 8 random natural numbers.
For example, if I set the range as (1, 100), then {1, 5,23, 26, 92, 12, 44, 76} would be generated.
How can I do this?

採用された回答

John D'Errico
John D'Errico 2020 年 4 月 1 日
  4 件のコメント
Steven Lord
Steven Lord 2020 年 4 月 1 日
Use randperm.
byungkeuk cho
byungkeuk cho 2020 年 4 月 1 日
Really appreciate it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by