Code running time calculation

1 次查看(过去 30 天)
Alina
Alina 2014-3-9
评论: SUMAN MAITI 2019-11-28
i have coded an algorithm in MATLAB, i want to calculate the processing time of that code.
means the time in which input is given and out put is produced. is there any method or process or code that calculate processing time time???

回答(1 个)

Mischa Kim
Mischa Kim 2014-3-9
编辑:Mischa Kim 2014-3-9
Alina, use tic at the beginning, and toc at the end of the part of the code you want to measure execution time of. E.g.,
tic
pause(3)
toc
  4 个评论
Tawanda Michael Guveya
how then can you assign the value to a variable.
SUMAN MAITI
SUMAN MAITI 2019-11-28
Each time it gives different time!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by