I am executing a MatLab program. I used tic-toc to compute execution time. BUT each time I got a different time? Why?

답변 (2개)

Muthu Annamalai
Muthu Annamalai 2015년 7월 28일

0 개 추천

Have you tried,
  1. >>doc timeit
  2. >>doc profile
Using timeit is easy but your script has to be in a function form. Using profile can be done as,
profile on
%your code
profile off
profile info

댓글 수: 1

Nisreen Sulayman
Nisreen Sulayman 2015년 7월 28일
편집: Nisreen Sulayman 2015년 7월 28일
I have got this:
ClockSpeed: 2528000000.00
What does that mean? How much time??

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

Image Analyst
Image Analyst 2015년 7월 29일

0 개 추천

Why shouldn't it? You computer is a multitasking machine. Sometimes it puts your program on hold to take care of other tasks. The number of other tasks that are going on at any given time can vary both in number and priority so the amount of time it has to pause your program varies. Hence the different times.

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

질문:

2015년 7월 28일

답변:

2015년 7월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by