Effacer les filtres
Effacer les filtres

If I run separate instances of Simulink, will set_param affect all instances?

3 vues (au cours des 30 derniers jours)
When I use set_param to change a parameter, is the change local to that instance of the model, or is the changed value in effect if I open another concurrent instance of the model? I run parameter studies from a Matlab script which loads the Simulink model with load_system, changes a gain with set_param, but doesn't subsequenly save the changed model. To speed up the study completion, I start 4 instances of Matlab on my 4-core machine and run a separate instance of the script in each Matlab session. I want to make sure that changes with set_param are local and would not affect the other concurrent instances of the model.

Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 28 Mar 2012
As long as you don't save the changes to the model, it shouldn't affect any concurrent sessions.
  1 commentaire
K E
K E le 28 Mar 2012
Thanks Kaustubha. Once I am further along I will use the Parallel Computing toolbox for a more elegant approach, but glad to hear that I am not getting into trouble here.

Connectez-vous pour commenter.

Plus de réponses (1)

Sean de Wolski
Sean de Wolski le 28 Mar 2012
I can't say with any certainty, but I wouldn't expect it to. I highly recommend that you check it!
Open two ML sessions, run it with the exact same configuration you are planning on using, and check the parameters in both sessions after.

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by