Anybody knows of a tool that can be used to automatically build diagrams of function calls in MATLAB?
E.g. For a given function, the tool would recursively go through function calls and build a 2D graph where nodes would represent functions and directed edges would connect calling functions with called functions.
Ideally the tool could allow the user to turn on and off filters to only include user-defined functions, limit the depth of recursion, etc.
I believe Doxygen provides some similar functionality for more traditional OOP languages, but I was wondering if something like this exists already for MATLAB.
Thanks!
You can use the techniques from those other answers referenced in gnovice's comment to get a list of function dependencies as (A,B) pairs, where A calls B. Then install GraphViz and use it to generate the diagrams. You can create the .dot files from Matlab with something like this.
GraphViz works great for lots of other tree and graph applications, like class inheritance and dependency trees, data flow, and so on.