Steve on Image Processing

June 15th, 2009

Getting the MATLAB code from blog posts

Sometimes readers will tell me they had a hard time reproducing results from one of my blog posts, so let me tell you the easiest way to do it. Almost all of my posts that show MATLAB examples have a link at the bottom that says "Get the MATLAB code."

To see how this works, go to my recent "Learning lessons from a one-liner" post, scroll down to the bottom, and click on the "Get the MATLAB code" link just before the comments section.

Loren's Art of MATLAB blog has the same feature.

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: 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...
  • Steve: Zanie—What do you need to know? If you have the product, then you have the documentation, right?
  • Steve: Mark—No problem about nextpow2. I’ve always thought that function name was confusing, and I...
  • Mark Andrews: Well, it would help if I read the documentation, wouldn’t it? I thought nextpow2 returned the...
  • Mark Andrews: Just some minor points, but I think K = 2^nextpow2(L); should be K = nextpow2(L); otherwise K is...
  • Zanie: I have R2008b could you please tell me about toolbox of this version.
  • Steve: To all—After almost four years of writing this blog, I still have no ability to predict which topics...
  • Cris Luengo: Also, going through the DFT you’re assuming a periodic boundary condition, whereas conv assumes...

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