필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
bsd
bsd 2011년 7월 22일
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

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 7월 22일
tic;
% do stuff
toc;
Also, see cputime(), etime(), clock()
  댓글 수: 1
Jan
Jan 2011년 7월 23일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Clocks and Timers에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by