File Exchange

image thumbnail

dep (unmaintained)

version (4.94 KB) by T. Guillod
Make a dependency report for a matlab file and plot the call graph. Make only static code analysis.


Updated 24 Jan 2020

View Version History

View License

Make a dependency report for a matlab file. Plot a dot graph of the result. Independent of the matlab depfun() function. Make only static code analysis.

Independent of the matlab depfun() function.

1) Find the matlab dependency for each matlab file in the directory.
2) Find all the dependency from the main file (recursively).
3) Plot the call graph.

Don't make infinite loop by recursive call.
You can include external function in the call graph.

There is some limitations. The output file is a dot file (graphwiz), so you can fix the error of the script.

Need a unix system.

Cite As

T. Guillod (2021). dep (unmaintained) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Sam Roberson

Exactly what I have been looking for. Excellent!

Took me a while to find though, which I think may be caused by the misspelling of 'graphwiz'.




Works perfectly for me, thank you very much for this nice piece of software!! I especially am impressed by your parsing of the m files, which is, as you pointed out, rather difficult compared to other languages.

You should add a note that the root m file string must contain the src-folder path as well (obviously it is not deduced from the first string in the dep.m function call), e.g.:
dep('src', 'src/myroot.m', 10, {}, 'fout')


MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!