Installation guide
8 Publishing Results
Publishing M-Files Using Cells
In this section...
“How to Publish an M-File” on page 8-2 4
“About Published M-Files” on page 8-25
“Modifying Published Output U sing Preferences” on page 8-26
How to Publish an M-File
When you publish an M-file that contains cells and text markup, MATLAB
produces an output document consisting of the M-file code, comments, and
results.
1 When you publish an M-file function, MATLAB does not run the code or
include results from running the code in the o utput document—for M-file
functions, clear the Evaluate code preference prior to publishing.
2 After adding cells and text markup to an M-file, select File > Publish To
and select an o utput format from those listed in the menu: HTML, XML,
LaTeX, Word,orPowerPoint. If the M-file contains unsaved changes,
the menu item becomes Save and Publish To.
You can also
publish to the default output format specified in Preferences
using the P
ublish button
in the Editor/Debugger toolbar.
MATLAB dis
plays the published document in the appropriate tool for the
selected o
utput format:
• HTML displ
ays in the MATLAB W eb Browser.
• XML displa
ys in the MATLAB Editor/Debugger.
• LaTeX disp
lays in the MATLAB Editor/Debugger.
• Word displ
ays in Microsoft Word.
• PowerPoin
t displays in Microsoft PowerPoint.
8-24