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 ExchangeSoftware 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