Search code examples
matlabrandomsimulinkrandom-seedsimevents

How to create random seed to have different results at each simevents run???(random seed?)


I would like to generate different seed at each time to have various outcomes ... I have tried "shuffle," however it showed that "it is not supported!" Wish someone can help me!Thank you~

This is my settings: . It makes my simulation to end with the same outcome every time.


Solution

  • You could generate a random number by writing a code in the model properties "callback." Then, take it as a reference for your seed to generate the random seed.