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

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Steve Eddins manages the Image & Geospatial development team at The MathWorks and coauthored Digital Image Processing Using MATLAB. He writes here about image processing concepts, algorithm implementations, and MATLAB.

  • Steve: Kezia—Try imrotate.
  • kezia: steve, how to perform rotation of structuring element by 15 degrees. kindly answer my question. thank u kezia...
  • Steve: Tasha—I only accept comments that are relevant to the particular blog post or are questions or comments...
  • Tasha: Steve,I send you a comment here but still didn’t get any reply yet.I did not see my comment posted here...
  • Steve: Carsten—Thanks for your input.
  • Carsten: Another vote for either imtranslate.m, or at least a blurb in the imtransform help why pure translation...
  • Loren Shure: If you look towards the end of the fftfilt program, you will see that there’s a check to see if...
  • Steve: Sonja—My imwritesize submission on the MATLAB Central File Exchange might be helpful. It was posted...
  • Steve: Grant—Sorry, but it won’t be for R2010a. That development deadline has already passed.
  • Sonja: My publisher is wanting images for a new book to be 300 dpi. Only 5 of the 19 images are 300, the rest are...

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