meta data for this page
  •  

This is an old revision of the document!


Back to the #itlab main page

Generating HTML-documentation

Go to http://www.artefact.tk/software/matlab/m2html/ and download the zip package. The package should contain subdirectories, so just unzip it somewhere.

To create function call graphs GraphWiz has to be installed: http://www.research.att.com/sw/tools/graphviz/ . Check your Linux-distributions package repositories for a ready-made package for graphwiz. Graphwiz is not required if you do not want to generate call graphs.

The m2html tool assumes you have already Matlab-style comments and documentation in your m-files. Remember the H1 line etc. If the Matlab command help somefunction shows a nice help text, you should be fine.

The tool is implemented in Matlab, so start Matlab and add the directory to your path.

addpath somewhere/m2html

Go to a directory that is one level <b>above</b> the directory where you have your m-files.

cd work/gmmbayes/src/matlab

Now is a good moment to read the brief manual:

help m2html

Let's generate documentation for work/gmmbayes/src/matlab/base2 directory:

m2html('mfiles', 'base2', 'htmlDir', 'doc','graph', 'on')

That will create some files and a directory under work/gmmbayes/src/matlab/doc, including index.html. Open that in your web browser. An example output of m2html may be found at http://work.pq.iki.fi/s/base2/