Get execution time of a Simulink model

23 ビュー (過去 30 日間)
Andre
Andre 2013 年 10 月 9 日
回答済み: Monika Jaskolka 2019 年 10 月 3 日
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 件のコメント
Shravan
Shravan 2019 年 4 月 4 日
Thanks Andre
It was helpful for me.

サインインしてコメントする。

回答 (1 件)

Monika Jaskolka
Monika Jaskolka 2019 年 10 月 3 日
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

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by