Can Matlab run for more than 100 million years ?
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(2 个)
Star Strider
2012-7-26
With respect to the title of your question, it's functionality you will appreciate if you ever run a large GlobalSearch problem!
0 个评论
Walter Roberson
2012-7-26
Remember, display in seconds is different than internal storage in seconds. Some of the high-speed counters roll over every few days.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!