Graphics Programs Reference
In-Depth Information
and help pages at all levels, many based at various universities. One of these
is the web site associated with this topic,
http://www.math.umd.edu/schol/matlab
where you can find nearly all of the MATLAB code used in this topic.
Posting MATLAB Programs and Output
TopostyourownMATLABprogramsoroutputontheWeb,youhaveanumber
of options, eachwithdifferent advantages and disadvantages.
M-Files, M-Books, Reports, and HTML Files
First, since M-files (either script M-files or function M-files) are simply plain
textfiles,youcanpostthem,asis,onawebsite,forinterestedpartiestodown-
load. This is the simplest option, and if you've written a MATLAB program
that you'd like to share with the world, this is the way to do it. It's more likely,
however, that you want to incorporate MATLAB graphics into a web page. If
this is the case, there are basically three options:
1. You can prepare your document as an M-book in Microsoft Word. After
debugging and executing your M-book, you have two options. You can
simply post the M-book on your web site, allowing viewers with a Word
installation to read it, and allowing viewers withbotha Word and a
MATLAB installation to execute it. Or you can click on File : Save As... ,
and when the dialog box appears, under “Save as type”, select “Web Page
( .htm, .html)”.ThiswillstoreyourentiredocumentinHTML(HyperText
Markup Language) format for posting on the web, and will automatically
convert all of the graphics to the correct format. Once your web document
is created, you can modify it withany HTML editor (including Word itself).
2. If you've installed the MATLAB Report Generator, it can take your
MATLAB programs and convert them into an HTML report with embed-
ded graphics.
3. Finally,youcancreateyourwebdocumentwithyourfavoriteHTMLeditor
andaddlinkstoyourMATLABgraphics.Forthistowork,youneedtosave
your graphics in a convenient format. The simplest way to do this is to
select File : Export... in your figure window. Under “Save as type” in the
dialog box that appears, you can for instance select “JPEG images ( .jpg)”,
and the resulting JPEG file can be incorporated into the document with a
Search WWH ::




Custom Search