I want to give a condition on the random function.
1 回表示 (過去 30 日間)
古いコメントを表示
I want to output only the values between 1 and 0.5, using the random function. A=rand>0.5 --> A between 1 and 0.5 example A =0.6, 0.7, 0.755, 0.954 others.. Hint plz....
0 件のコメント
回答 (1 件)
the cyclist
2015 年 6 月 15 日
編集済み: the cyclist
2015 年 6 月 15 日
A = 0.5 + 0.5*rand(N,1)
where N is the number of values you want.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!