how to know how much time it takes to run the matlab code?

13 vues (au cours des 30 derniers jours)
bsd
bsd le 22 Juil 2011
Dear sir/madam,
I need to know, how much time does a code take to run and display the output? how can I calculate this in matlab? Looking forward to hearing from you soon.
Thanking you, BSD

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 22 Juil 2011
tic;
% do stuff
toc;
Also, see cputime(), etime(), clock()
  1 commentaire
Jan
Jan le 23 Juil 2011
And PROFILE. Be aware that CPUTIME can lead to unexpected results if you run a multi-core machine. And CLOCK suffers from its connection to the real time clock: Changing the day-light-saving time or an automatic update of the clock via NTP can disturb the speed measurements.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by