Steve on Image Processing

December 31st, 2008

Another timeit update

I just posted another timeit update to the MATLAB Central File Exchange. (See my original post on timeit for a detailed explanation of its purpose and use.) The new version has a few improvements:

  • Times very fast functions more accurately
  • Warns you when the reported time might be affected by time-measurement overhead
  • Takes less time to finish for functions that take more than a few seconds to run

Here's an example of the new warning message:

>> timeit(@() sin(pi))
Warning: The measured time for F may be inaccurate because it is close to the
estimated time-measurement overhead (1.2e-006 seconds).  Try measuring something
that takes longer. 
> In timeit at 100

ans =

  2.7797e-007

Comments are closed.


MathWorks
Steve Eddins is a software development manager in the MATLAB and image processing areas at MathWorks. Steve coauthored Digital Image Processing Using MATLAB. He writes here about image processing concepts, algorithm implementations, and MATLAB.

These postings are the author's and don't necessarily represent the opinions of MathWorks.