knowing how much time does running of a m-file take?

1 次查看(过去 30 天)
does anyone know how we can know time between from starting to finishing a program (how much time does it take from starting to finishing of a program that written in a m-file)?

采纳的回答

Andrei Bobrov
Andrei Bobrov 2011-9-5
variant 1 (command window)
>>tic
varoutput = yourfun(varinput) % use your m-file yourfun.m
tim = toc
% tim - time use your programm from yourfun.m
  4 个评论
Andrei Bobrov
Andrei Bobrov 2011-9-5
h=tim/3600
m = rem(h,1)*60
hms = [fix(h) fix(m) rem(m,1)*60]

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by