/doxymatlab

Doxygen parser for MATLAB. Extracts automatically comments from your Matlab .m files using Doxygen to generate the documentation.

Primary LanguageMATLABBSD 2-Clause "Simplified" LicenseBSD-2-Clause

doxymatlab

This package allows you to extract automatically comments from your Matlab .m files using Doxygen to generate documentation.

This package provides :

  • a perl script (m2cpp.pl) used to filter the .m files so that Doxygen can understand them
  • a template for the Doxyfile file (configuration file for Doxygen) which has to be modified according to the location of your code
  • documentationGuidelines.m, an .m file which describes how you should comment your code so that Doxygen can extract it and create nice documentation
  • classDocumentationExample.m : an .m file describing possible comment for classes
  • all the documentation (html format) automatically generated by Doxygen from the two .m files (see Doc/html/index.html), which provides informations about installation and how to write Doxygen comments.

Installation

  • You need to have the Doxygen software installed (version 1.5.9 or newer required (tested with version 1.8.12))
  • You need to have perl installed (perl is shipped with Matlab, located usually in $matlabroot\sys\perl\win32\bin)
  • unzip the DoxygenMatlab.zip to C:\DoxygenMatlbab (for example)
  • get the Doxyfile file from the C:\DoxygenMatlbab directory and replace the default Doxyfile provided by Doxygen
  • edit the Doxyfile file (or use the DoxyWizard tool provided by Doxygen) to modify a few settings:
    • EXTENSION_MAPPING=.m=C++
    • FILTER_PATTERN=*m=C:\DoxygenMatlbab\m2cpp.pl (m2cpp.bat on Windows platform)
    • FILTER_SOURCE_PATTERNS=C:\DoxygenMatlbab\m2srcm.pl (m2srcm.bat on Windows platform)
    • PERL_PATH=
    • INPUT=
    • OUTPUT_DIRECTORY=
    • STRIP_FORM_PATH=

Note for Windows users

Use the bat files instead of .pl scripts for both FILTER_PATTERN and FILTER_SOURCE_PATTERNS settings as explained above.

Note for Linux/Mac users

Run the provided script convertToUnix.sh to strip the carriage return and the .exe extension from the script.

Usage

Source browser

To enable the source browser edit the Doxyfile as follow:

FILTER_SOURCE_FILES    = YES
SOURCE_BROWSER         = YES
FILTER_SOURCE_PATTERNS = *m=C:\DoxygenMatlbab\m2srcm.pl (m2srcm.bat on Windows platform)

The script m2srcm.pl probably needs more testing, so may not work in general.

License

Copyright (c) 2009, Fabrice All rights reserved.

See license.txt for redistribution and modification conditions.

References

Official file exchange page by Fabrice