Using Doxygen with Matlab

版本 1.8.0.0 (87.4 KB) 作者: Fabrice
Extracts automatically comments from your Matlab .m files using Doxygen to generate documentation
9.9K 次下载
更新时间 2011/4/6

查看许可证

编者注: 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)

引用格式

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

MATLAB 版本兼容性
创建方式 R2008a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Adding custom doc 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
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 (~)