Simulink: setting different random number generator seeds even when using past SimState
Afficher commentaires plus anciens
Hi,
I have a problem in that I need to run multiple simulations using a previously saved SimState with different randomness seeds. I haven't managed to get this to work yet.
I have tried using
set_param('mod/Random Number', 'Seed', '3324')
and this works if I don't use a previously saved SimState, but as soon as I try this with a SimState all simulations still end up with the same random numbers (I guess that the newly set seed is being ignored and instead the seed saved in the SimState is being used, although I have tried looking at the SimState data structure and I couldn't really figure out if it even contains the past seed and if it does how I am supposed to go about changing it).
What would be my best approach here?
Note: I have tried to manually implement a random generator and getting the random numbers using a root level input, but the problem here is that with a variable step solver the interpolation doesn't work!
Réponse acceptée
Plus de réponses (1)
James
le 10 Mar 2013
0 votes
For those of you still looking for a solution, someone posted this on file exchange, it might help you out.
Catégories
En savoir plus sur Sources dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!