Get execution time of a Simulink model

조회 수: 21 (최근 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 CenterFile Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by