Why is there a time difference in tic toc in multiple runs

3 visualizzazioni (ultimi 30 giorni)
In the following code, the execution time returned by tic toc varies in each run. Why?
tic ones(50) toc

Risposte (1)

Rick Rosson
Rick Rosson il 2 Feb 2016
Because tic toc measures elapsed time rather than cpu time. Try using profile instead.
  3 Commenti
Walter Roberson
Walter Roberson il 2 Feb 2016
What if your computer has to get busy popping up Clippy to remind you that you have not saved a document?

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by