How tic/toc calculate execution time?

4 vues (au cours des 30 derniers jours)
bkshn
bkshn le 17 Mai 2015
Modifié(e) : Stephen23 le 17 Mai 2015
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

Réponses (1)

Stephen23
Stephen23 le 17 Mai 2015
Modifié(e) : Stephen23 le 17 Mai 2015
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.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by