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!