Using Doxygen with Matlab

Versione 1.8.0.0 (87,4 KB) da Fabrice
Extracts automatically comments from your Matlab .m files using Doxygen to generate documentation
9,8K download
Aggiornato 6 apr 2011

Visualizza la licenza

Nota dell'editore: This file was selected as MATLAB Central Pick of the Week

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 details :
- You need to have the Doxygen software installed (version 1.5.9 or newer required (tested with version 1.7.1))
- 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 :
o EXTENSION_MAPPING=.m=C++
o FILTER_PATTERN=*m=C:\DoxygenMatlbab\m2cpp.pl
o PERL_PATH=<path to your perl version>
o INPUT=<directory where your documented code is located>
o OUTPUT_DIRECTORY=<directory where you want to generate your documentation>
o STRIP_FORM_PATH=<directory where your documented code is located>

Note for Windows users :
In certain circumstances, the association between .pl files and the perl executable is not well configured, leading to "Argument must contain filename -1 at C:\DoxygenMatlab\m2cpp.pl line 4" when running doxygen. To work around this issue, you should execute the following lines in a Windows command prompt ("cmd") :

assoc .pl=PerlScript
ftype PerlScript=C:\Program Files\MATLAB\R2010b\sys\perl\win32\bin\perl.exe %1 %*
(don't forget to replace the path to the perl.exe file with yours in the line above)

Cita come

Fabrice (2024). Using Doxygen with Matlab (https://www.mathworks.com/matlabcentral/fileexchange/25925-using-doxygen-with-matlab), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2008a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Adding custom doc in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.8.0.0

Fixed a few bugs :
- property names (and method names) beginning with end are now allowed (as pointed out by Vincent)
- inheritance with classes containing a dot is now supported (as pointed out by Evgeni Pr)

1.5.0.0

Added support for :
* @-folder for classes
* multiple inheritance
* class attributes
* private / protected / public properties and methods
* abstract methods
* constant properties
* events
* ignored arguments (~)