Multiple instances of randi in Stateflow generate same sequence of numbers
1 次查看(过去 30 天)
显示 更早的评论
Hello
I have multiple instances of randi function call in my chart and the problem is that randi produces exaclty same sequence of numbers everywhere
How to avoid this?
0 个评论
回答(1 个)
Sahithi Kanumarlapudi
2019-10-29
'rng’ function can be used to control the random number generation.
Call this function before calling ‘randi’.
For more information in ‘rng’ refer to the following links
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!