Get execution time of a Simulink model

81 vues (au cours des 30 derniers jours)
Andre
Andre le 9 Oct 2013
Hello,
I haven't found an answer to this question, but I have figured it out. So if someone else want to know the run time of his/her Simulink model you can use this source code in a m-File:
%Get execution time of model:
open('Path to model.mdl');
disp('Model is still running!')
tic;
sim 'model.mdl'
executionTime=toc
disp('Model is finished.')
andre
  1 commentaire
Shravan
Shravan le 4 Avr 2019
Thanks Andre
It was helpful for me.

Connectez-vous pour commenter.

Réponses (1)

Monika Jaskolka
Monika Jaskolka le 3 Oct 2019
I have a script on the File Exchange that does just this. You can also execute the model several times and get the min/max/mean execution times: https://www.mathworks.com/matlabcentral/fileexchange/72854-model-execution-time

Catégories

En savoir plus sur Simulink Environment Customization dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by