Desktop Tools and Development Environment Previous page   Next Page

About Published M-Files

Published Filenames and Locations

MATLAB names the published file the same as the M-file that produced it, adding the relevant extension for the selected output format: .html, .xml, .tex, .doc, or .ppt. MATLAB stores this output file, along with supporting files such as images of figure windows, in the html subdirectory under the directory containing the M-file you published.

For example, when you publish d:/mymfiles/sine_wave.m to HTML, MATLAB creates a directory d:/mymfiles/html that includes the published document sine_wave.html. Any figure windows produced by running the M-file appear as image files in the directory, for example, sine_wave_img.png. TeX equations are image files as well: in the example, the equation file is sine_wave_eq_eq####.png. In addition, MATLAB creates a thumbnail file for the document, sine_wave_img_thumbnail.png in the example, used in the Visual Directory in the Current Directory browser.

Publishing Code that Displays Hyperlinks in Command Window

If the M-file you publish contains statements that display hyperlinks in the MATLAB Command Window, the published document shows the code rather than the hyperlinks.

For example

disp('<a href="http://www.mathworks.com">Link to MathWorks</a>')

displays

Image of hyperlink text (underlined and in blue) Link to MathWorks.

in the Command Window. You can click the link to go to the MathWorks Web site. When that disp statement is in an M-file you publish, the hyperlink tag and the text between it, that is,

<a href="http://www.mathworks.com">Link to MathWorks</a>

rather than the link, appears in the published document.

Similarly results occur if you include

help matlab_functioname

in an M-file.


Previous page  Publishing M-Files Using Cells Modifying Published Output Via Preferences Next page

© 1994-2005 The MathWorks, Inc.