Effacer les filtres
Effacer les filtres

Can Matlab run for more than 100 million years ?

1 vue (au cours des 30 derniers jours)
SK
SK le 25 Juil 2012
From the matlab documentation for cputime (R2012a):
cputime returns the total CPU time (in seconds) used by your MATLAB application from the time it was started. This number can overflow the internal representation and wrap around.
>> (2^52-1)/(3600*24*365)
ans =
1.428082073620781e+08
t1 = cputime;
pause(5);
t2 = cputime;
display(num2str(t2-t1));
0.0156
tic;
pause(5);
toc;
Elapsed time is 5.000548 seconds.
Am I correct in assuming that cputime measures the cpu time used by the matlab computation, while (tic, toc) measures the total elapsed time (wall time).
Is cputime the time used by the computation only or the entire matlab process? How does one interpret when the computation is performed on multiple processors simultaneously?
I ask because there seems to be some confusion over this in the posts I could find.
Thank you. Regards, Sandeep.

Réponses (2)

Star Strider
Star Strider le 26 Juil 2012
With respect to the title of your question, it's functionality you will appreciate if you ever run a large GlobalSearch problem!

Walter Roberson
Walter Roberson le 26 Juil 2012
Remember, display in seconds is different than internal storage in seconds. Some of the high-speed counters roll over every few days.

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by