Ever wanted a class dependency diagram and documentation of your MATLAB Classes. How about leveraging Doxygen to document your development project?
Fabrice provides a simple interface to make this possible. Interestingly enough, this entry doesn't actually contain MATLAB Code!
Do you want to know how MATLAB Classes are related?
The above image shows a subset of the class hierarchy for a project I have been working on, which I was able to generate using Fabrice's tool.
The diagram depicts each class in a box. The arrow points to the parent class from which each class is inherited.
The terminus for the dependency path is a built-in class in MATLAB, which in this case is "handle".
If you use comments in MATLAB Code to document your functions and classes, then you need to apply Fabrice's extra convention of "%>" instead of just "%" to determine which comments get parsed by Doxygen.
In addition Doxygen convention is the documentation for a function by default comes before the function, which the convention in MATLAB is that it comes after the function. To make sure your documentation is available in Doxygen and using the MATLAB DOC function, then you likely want to consider using the "<" flag in your first comment after a MATLAB Function or class parameter definition.
I did make a quick modification of the Perl script in Fabrice's entry to automate that process so that "%>" was replaced by "///<" and make the assumption that MATLAB Documentation always comes after the function or parameter definition.
You can use comments in your MATLAB code to generate documentation without any additional work. However it doesn't provide much in the way of developing dependency graphs.
- Do you use Doxygen to document your software development projects?
- Should this be a capability built into MATLAB or Simulink?
- What about generated C or HDL-code?
- Do you use a different method for using Doxygen with MATLAB?
Let us know here.
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.