How can I select a random number between 0 and 1, if the result should have only one decimal ? e.g result= 0.6 , result=0.2, result =0.9
2 ビュー (過去 30 日間)
古いコメントを表示
thank you in advance
0 件のコメント
採用された回答
Massimo Zanetti
2016 年 9 月 28 日
編集済み: Massimo Zanetti
2016 年 9 月 28 日
Here it is.
rnd = 0.1*(randi(11)-1);
It gives a random number among 0.0, 0.1, ... , 1.0
0 件のコメント
その他の回答 (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!