What is the standard way to create a dependency graph in R2018a?

6 ビュー (過去 30 日間)
Anish Potnis
Anish Potnis 2018 年 12 月 14 日
編集済み: Adam Danz 2018 年 12 月 14 日
Now that depfun() is deprecated, a few of the MATLAB exchange tools that generate a graph of the dependency structure of a folder no longer work. What is Mathworks' recommended approach to generating such a visualization? I assumed this would be a common need and I'm surprised there doesn't seem to be a standard way of doing this.
Thanks.

回答 (1 件)

Adam Danz
Adam Danz 2018 年 12 月 14 日
編集済み: Adam Danz 2018 年 12 月 14 日
depfun() listed the paths of all files a specific m-file (or p-file) needed to function. It didn't produce a graph, unless you're refering to a different 3rd party function.
If you're trying to list the matlab files and toolboxes required to run a specified function, use matlab.codetools.requiredFilesAndProducts()
Example
[funcList, toolList] = matlab.codetools.requiredFilesAndProducts('MyFunction.m');
funcList' %this lists all function dependencies
{toolList.Name}' %this lists any toolbox/product dependencies
{toolList.Version}' %this lists toolbox/product version numbers

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by