How to generate random number within a range?

4 ビュー (過去 30 日間)
VIJAY
VIJAY 2020 年 1 月 27 日
コメント済み: Stephen23 2020 年 1 月 27 日
I want to generate a random number between 0.2 to 1

採用された回答

Stephen23
Stephen23 2020 年 1 月 27 日
>> 0.2+(1-0.2)*rand()
ans =
0.85178
  2 件のコメント
VIJAY
VIJAY 2020 年 1 月 27 日
thank you
Stephen23
Stephen23 2020 年 1 月 27 日
@VIJAY: please don't forget to accept my answer!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSources についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by