How tic/toc calculate execution time?

Hello
I have a function that call several functions like bellow
function A()
{
tic
function B();
function C();
function D();
toc }
if I use tic/toc at start and end of function A, Does it calculate execution time of function B,C,D?
thanks

답변 (1개)

Stephen23
Stephen23 2015년 5월 17일
편집: Stephen23 2015년 5월 17일

0 개 추천

Yes.
The documentation clearly states that tic starts a timer, and toc reads the elapsed time of that timer. You can put anything you want in between.

카테고리

도움말 센터File Exchange에서 Software Development Tools에 대해 자세히 알아보기

질문:

2015년 5월 17일

편집:

2015년 5월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by