Steve on Image Processing

January 17th, 2006

MATLAB’s publish function

Have you discovered the Publish to HTML functionality in MATLAB 7 yet? If not, you should definitely check it out.

I generated the HTML for my recent blog entry, Synthesizing images using simple equations, directly from an M-file script.

For example, the "Start with meshgrid" section was generated from this part of the M-file:

%% Start with meshgrid
% The MATLAB function |meshgrid| is extremely useful for computing a
% function of two Cartesian coordinates, and you can make some interesting
% images this way.
%
% |meshgrid| is kind of hard to explain in words.  It's easier to just look 
% at what it does.

x = 1:3;
y = 10:14;
[xx, yy] = meshgrid(x, y)

Output in the command window is automatically captured and included in the generated HTML, and any figures created are also captured and stored as image files.

In addition to HTML, you can also publish to Word, to LaTeX, to PowerPoint, or to XML.

Read more about this MATLAB feature in the Users Guide. You should also check out Loren Shure's Art of MATLAB blog on MATLAB Central.

One Response to “MATLAB’s publish function”

  1. Paul replied on :

    Hurry up and write some more Steve, I’m eagerly awaiting your next entry! I don’t know much about image processing but am enjoying your blog and am expecting to learn some useful bits and pieces, keep up the good work!

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.

  • Sana: hi steve, could you explain to me how i would be able to use the dir function, to do a loop through a directory...
  • Nishtha: Sir, I have preprocessed the image in following steps: [1] adaptive histogram equalization [2] thresholding...
  • Kristof: I also strongly support the idea. I have just recently bumped into the problem that im2single was not...
  • Steve: David—I’ m glad you found it useful!
  • David Lalejini: I found your example very useful for finding connected nodes in a large set of input pairs. I start...
  • tommy: Dear Steve, I have a question,please if you are kind to help me regarding the accumulator array dimensions of...
  • Steve: Abc—I don’t know how to distinguish the faces. You might try posting your question in the MATLAB...
  • Manju: well if we have a few ovals within each other like in a cell how do we measure the distance from the center...
  • Steve: Manju—What do you mean? How is each region defined?
  • Manju: if we have 2-3 regions within each other how do we measure the regions of each one?

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