View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Generate help files from m-files

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

3.5 | 2 ratings Rate this file 7 Downloads (last 30 days) File Size: 117 KB File ID: #9687 Version: 1.0
image thumbnail

Generate help files from m-files


Wolfgang Garn (view profile)


18 Jan 2006 (Updated )

Help files are generated from m-files.

| Watch this File

File Information

These functions read the comments from the m-function (or script) marks them up. It is based on Matlab's publish function.

It is also possible to inculde examples and simple LaTeX formulas within the help text.

To create the help file for a single Matlab function call:

To create the help for a single directory use:

To create the help for an entire project (including all subdirectories)
simply execute:

To generate a corresponding index (contents) page try create_index_html.

In case you like a certain words always highlighted or as headings you can easily add them within wg_publish.

- help/documentation in html, latex, doc, ...
- executes Matlab examples and includes them in the help
- includes graphics
- integrates simple formulas
- creates html index
- cross-referencing

I suggest to also use m2html from Guillaume Flandin and
the publish.m (publish_technics.m) function from Mathworks.

This function was only tested under Windows XP.
There are still a lot of formatting issues to do.

To Do: (Status: 18.1.2006)
+ documentation of subfunctions
+ improve formatting
+ hyperlinks to Matlab internal functions
+ extend Matlab/Latex command set
+ include Navigationbars in html documents (like one in the Matlab toolboxes)
+ collect all generated latex or word documents to only one document
+ combine with m2thml


Publish Technics, Text2speech Tts, File2str, and Str2file inspired this file.

This file inspired File2str, Str2file, and Text2speech Tts.

MATLAB release MATLAB 7.0.4 (R14SP2)
Other requirements (probably) Windows XP, (perhaps) Matlab 7.04
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
18 Mar 2010 Rob Campbell

Rob Campbell (view profile)

Update: I agree with the author. Try this instead:

Comment only
18 Mar 2010 Rob Campbell

Rob Campbell (view profile)

Fails to run on a Linux machine because of forward-slash/back-slash confusions. This could easily be avoided with the isunix command. Even after I corrected this, the code still wouldn't run. Log flag isn't useful. Doesn't even re-throw the last error in the catch block.

Comment only
15 Feb 2006 sravanthi vudumula  
20 Jan 2006 G√ľnther Balatka

this is an excellent documentation and the file is very useful for generating help files!

19 Jan 2006 John D'Errico

Did not run for me- might be OS (I'm on a Mac) specific.

Comment only

Contact us