Search code examples
matlabdependenciescode-analysiscall-graph

Call graph generation from matlab src code


I am trying to create a function call graph for around 500 matlab src files. I am unable to find any tools which could help me do the same for multiple src files.

Is anyone familiar with any tools or plugins?

In case any such tools are not available, any suggestions on reading 6000 lines of matlab code without documentation is welcome.


Solution

  • Let me suggest M2HTML, a tool to automatically generate HTML documentation of your MATLAB m-files. Among its feature list:

    • Finds dependencies between functions and generates a dependency graph (using the dot tool of GraphViz)
    • Automatic cross-referencing of functions and subfunctions with their definition in the source code

    Check out this demo page to see an example of the output of this tool.