Call graph generation from matlab src code

Vijay picture Vijay · Sep 14, 2011 · Viewed 7.3k times · Source

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.

Answer

Amro picture Amro · Sep 16, 2011

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.