i want produce a random number between 2 and 10 for example...

1 回表示 (過去 30 日間)
fatemeh
fatemeh 2013 年 10 月 19 日
コメント済み: Azzi Abdelmalek 2013 年 10 月 20 日
how can produce a random integer number that are not started with 1?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 19 日
2+rand*(10-2)
  1 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 20 日
for integer number
randi([2 10])

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

その他の回答 (1 件)

LY Cao
LY Cao 2013 年 10 月 19 日
randi(9)+1

カテゴリ

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