Borrar filtros
Borrar filtros

Simulink model in a for loop

4 visualizaciones (últimos 30 días)
Mitch Martelli
Mitch Martelli el 9 de Nov. de 2011
Hi at all, I have a problem when I run a simulink model inside a for loop.
More in detail when I run the model with the command:
set_param('model_name','SimulationCommand','start')
the script doesn't wait the end of the simulation before continue...
There some commands like the waitfor or the drawnow?
Thanks
M1tc4

Respuesta aceptada

Titus Edelhofer
Titus Edelhofer el 9 de Nov. de 2011
Hi Mitch,
I would usually suggest to use the function sim for running simulations, or is there any reason you can't use sim?
Titus
  5 comentarios
Titus Edelhofer
Titus Edelhofer el 9 de Nov. de 2011
Hi Mitch,
sorry, set_param was wrong, it's simset that you need to use
opt = simset('DstWorkspace', 'current');
and pass this to sim.
Sorry!
Titus
Mitch Martelli
Mitch Martelli el 9 de Nov. de 2011
Fantastic... I dont need to open the model... I dont need to put a pause...All the variables are stored in the workspace with the correct name...
Thanks a lot Titus

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by