How to generate a random decimal number between 1.0 and 1.52?
3 ビュー (過去 30 日間)
古いコメントを表示
rand([1.0,1]);
May I know why this is not working?
0 件のコメント
採用された回答
Ameer Hamza
2020 年 10 月 29 日
編集済み: Ameer Hamza
2020 年 10 月 29 日
You can generate them by scaling and translating the output of rand()
range = [1.0,1.52];
x = rand()*diff(range)+range(1)
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!