DoxyGen filter for MatLab code

Source code documentation with Doxygen http://www.Doxygen.org isn't limited to C/C#/C++ or Java. Using the FILTERS feature http://www.doxygen.org/config.html#cfg_filter_patterns a filter program can convert the programming language you are using into something like C and that would be used by DoxyGen.

The project documentation is part of the SourceForge project:

http://sourceforge.net/projects/doxyf/

This filter has improved on the original mtoc to track classes and properties.

Types

All types are stated as 'type'.

Classes in MatLab are treated as C++ classes

This works well. There is one exception and that is for methods defined in their own implementation file.

Standalone methods

There is a fiddly bit with member functions that are in the same directory as their containing class. You have to use some meta-commands to get these to work.

In the class file, Model.m, declare the extra functions, say convolve() in as a function.

% @fn type convolve(type obj, type arg1, type arg2, type functor)

Then in the convolve.m file before the function is defined:

% @fn type Model::convolve(type obj, type arg1, type arg2, type functor)
%
% The convolve function takes two arrays and a function pointer.
function result = convolve(obj, x, y, fn)
  result = fn(x, y);
end

Note: I haven't been very careful with the line-numbering. And in the class file Model.m, the use of the function definitions will throw the line-numbering out. So if you do use the line-numbering, put the dummy declarations at the end.

Properties

Property get and set functions are converted to functions by changing the dot to an underscore.

 All Classes Namespaces Files Functions Variables
Generated on Sun May 16 04:20:00 2010 for MatLab by  doxygen 1.6.3