Borrar filtros
Borrar filtros

How to run a model in simulink several times like a flowchart

2 visualizaciones (últimos 30 días)
Milad Bahaedini
Milad Bahaedini el 24 de En. de 2023
Comentada: Jon el 14 de Feb. de 2023
Hi,
I have a model in simulink which includes some function blocks. Now I want to run this model 10 times and each time compare the output of the model to a value and if needed change an input for the next run. anyone can help?

Respuestas (1)

Jon
Jon el 24 de En. de 2023
You can use the MATLAB sim command to run Simulink programatically in a loop, please see https://www.mathworks.com/help/simulink/slref/sim.html
  2 comentarios
Milad Bahaedini
Milad Bahaedini el 24 de En. de 2023
yes this maybe works but I'd like to do it in simulink.
Jon
Jon el 14 de Feb. de 2023
I think for what you describe it would make sense to run Simulink "externally" from a loop in MATLAB but you could try to put your workflow into a for iterator subsystem within Simulink https://www.mathworks.com/help/simulink/slref/foriteratorsubsystem.html

Iniciar sesión para comentar.

Categorías

Más información sobre Subsystems en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by