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.

5 Responses 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!

  2. Noah replied on :

    Is there a way for me to pass variables to function that I want to publish?

  3. Steve replied on :

    Noah—See the doc for publish configurations.

  4. Feda replied on :

    Hi, I’m just learning about signal/image processing and your blog posts quite often turn out to be the best hit to my web-searches. I thought it would be a good idea to start from your first post and read through them all. It would be nice to have a “first-post” button..
    By the way, the link to the Users Guide is broken.
    Thanks.

  5. Steve replied on :

    Feda—I fixed the doc link, thanks.


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 The MathWorks.