MATLAB variable dependency analyzer (beta)

Visualize the dependency graph of variables in the entire MATLAB project with Graphviz
ダウンロード: 267
更新 2015/9/9

## Features
This tool creates a graph of variable dependencies in MATLAB projects, intended for exploring a new MATLAB project, debugging, etc. You can arbitrarily specify the variable of interest, depth of the graph, variables to exclude from the result (since drawing all variables makes the output unreadable), mark specified variables with a different color, etc.
The statement

A(B(1:N)) = func(a,b,c) + exp(D)

creates edges and nodes in the dependency graph

A <- B, N, func, a, b, c, exp, D

A similar tool, m2html, creates a dependency graph (script call relationship) of *.m files. This tool tries to go one step further and draw a graph of the dependency of variables.

This tool can be used to track down the cause of unwanted NaN, Inf, complex numbers etc. in your MATLAB project. The attatched `checkvars.m` is a simple assertion checker that detects NaN variables and outputs a list. You can specify and mark such variables with a different color, or exclude such variables from the result for smooth analysis.

This tool has a very simple implementation and still has many limitations, since it mostly only recognizes basic assignment statements.

## Usage
1. Place all *.m files in the same directory as this file
2. Call `vargraph.py -r <myvar>` from the terminal (multiple vars, maximum graph depths can be specified)
Please refer to the GitHub repo or the README for details.

## What it can do
- Analyze assignment statements
- Increment variables used in for loops are marked separately (with a blue color)
- Recognize assignments of global variables edited in function files (they are counted as dependencies)
- Recognize function names declared as .m files and mark them separately (with a yellow color)

## What it cannot do (TODO)
- Analyze multiple variable assignments (which is quite fatal...)
- Analyze the dependency of function arguments and its outputs
- Analyze nested function declerations
- Analyze class files and structs

## References
Example images were generated using "Newton-Raphson Loadflow" by PRAVI (2008), http://www.mathworks.com/matlabcentral/fileexchange/21059-newton-raphson-loadflow

引用

Hikaru Ikuta (2024). MATLAB variable dependency analyzer (beta) (https://github.com/woodrush/MATLABvargraph), GitHub. に取得済み.

MATLAB リリースの互換性
作成: R2015a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersSearch Path についてさらに検索

Community Treasure Hunt

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

Start Hunting!

GitHub の既定のブランチを使用するバージョンはダウンロードできません

バージョン 公開済み リリース ノート
1.0.0.0

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。