How to measure running time of a code using MATLAB
조회 수: 475(최근 30일)
표시 이전 댓글
Hi. I am new in using MATLAB. I have a thesis about code optimization along with my partner. It was recommended by our adviser to use the software in order t measure the running time of the code. The code is in Java Programming Language. Now, how can I measure the running time of the code using MATLAB?
댓글 수: 2
Rehan Ashraf
2017년 10월 18일
hi; where you want to calculate the time of your code so first you placed tic and toc command in your script.e.g: start tic; code toc
채택된 답변
Lucas García
2011년 11월 8일
Maybe this article also helps:
댓글 수: 6
wafa derouaz
2016년 10월 2일
편집: wafa derouaz
2016년 10월 2일
Walter Roberson, Thank u so much. So helpful.
추가 답변(1개)
Taha
2016년 5월 3일
beginn your script with tic and end it with toc. At the end the Elapsed time is showed in MATLAB in seconds.
댓글 수: 3
참고 항목
범주
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!