Multiple instances of randi in Stateflow generate same sequence of numbers

1 visualizzazione (ultimi 30 giorni)
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?

Risposte (1)

Sahithi Kanumarlapudi
Sahithi Kanumarlapudi il 29 Ott 2019
'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

Categorie

Scopri di più su Complex Logic in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by