Multiple instances of randi in Stateflow generate same sequence of numbers

조회 수: 2 (최근 30일)
Artyom
Artyom 2019년 10월 26일
답변: Sahithi Kanumarlapudi 2019년 10월 29일
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?

답변 (1개)

Sahithi Kanumarlapudi
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

카테고리

Help CenterFile Exchange에서 Decision Logic에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by