Running simulation a specified number of times

Hi,
Is it possible to run a simulink simulation in a continious loop. i.e after each completion of my simulation, I want the model to restart again and complete the next run. I want this so that I can send some data continiously to another interface, just for some test purpose.
Thanks , Ari.

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 22 Nov 2011

1 vote

Put sim('MyModel') inside your for-loop.

1 commentaire

Also see this page for more information on getting outputs and logged states from the sim command: http://www.mathworks.com/help/toolbox/simulink/ug/f11-61836.html

Connectez-vous pour commenter.

Catégories

En savoir plus sur Prepare Model Inputs and Outputs dans Centre d'aide et File Exchange

Question posée :

Ari
le 22 Nov 2011

Community Treasure Hunt

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

Start Hunting!

Translated by