How to generate a random numbers with increase in percentage?
7 ビュー (過去 30 日間)
古いコメントを表示
Dhanuja Elizabeth Thomas
2016 年 5 月 30 日
回答済み: Roger Stafford
2016 年 5 月 30 日
I need to generate a uniform random speed with minimum speed 10 m/s and maximum 40 m/s. For that I'm using :
rand_speed(step) = min_speed+rand*(max_speed-min_speed);
What I'm asking for is to generate the next random speed with 10 percent increase from the previous speed assigned.
Is there any MATLAB function that generates random speed with this constraint.
2 件のコメント
Roger Stafford
2016 年 5 月 30 日
There would appear to be an inherent contradiction in the statement “next random speed with 10 percent increase from the previous speed.” Either the next speed is an exact ten percent increase or it is somehow random. The two concepts don’t match. Perhaps you mean that the expected value of the next speed should be a ten percent increase?
採用された回答
その他の回答 (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!