Matlab stop time or running time

12 次查看(过去 30 天)
tevzia
tevzia 2013-11-30
回答: per isakson 2013-11-30
Hi, I am running a model that takes hours and i am wondering how long does it take for further run. I can see start time on command history but is there anywhere or any code that shows when program ended running. or how could i add a code that shows total time of execution?

回答(2 个)

Jeremy Wurbs
Jeremy Wurbs 2013-11-30
You can use the tic and toc commands:
tic
pause(1.5) % put your code here
time = toc

per isakson
per isakson 2013-11-30

类别

Help CenterFile Exchange 中查找有关 Performance and Memory 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by