Dependency Analyzer
Visualize dependencies, find required files, and assess the impact of changes
Since R2023a
Description
The Dependency Analyzer app is an interactive tool for visualizing and analyzing dependencies among files.
Every design, whether it is a folder, a Simulink® model, or a project, requires a set of files and products to run successfully. Dependencies include data files, model references, linked libraries, MATLAB® and C/C++ code, Stateflow® charts, and requirements documents.
Use the Dependency Analyzer to perform a dependency analysis. You can run a dependency analysis at any point in your workflow. In a collaborative environment, you typically check dependencies:
When you set up or explore a design for the first time
When you run tests to validate changes to your code
Before you submit a version of your code to source control
Before you share your code
With the Dependency Analyzer, you can:
Find required products and add-ons.
Investigate and resolve problems.
Perform an impact analysis to determine the impact of changing particular files.
Export the dependency analysis results.
Open the Dependency Analyzer App
MATLAB toolstrip: On the Apps tab, under MATLAB, click the Dependency Analyzer icon .
For instructions on how to run a dependency analysis on a folder or a file, see Dependency Analysis for Folders and Files.
Project toolstrip: On the Project tab, click the down arrow to expand the Tools gallery. Under Apps, click Dependency Analyzer.
Perform a project dependency analysis to explore the dependency graph using source control and project-specific views. For more details, see Analyze Project Dependencies. For projects that contain models, Dependency Analyzer provides model-specific views. See Explore the Dependency Graph, Views, and Filters (Simulink).
Simulink Editor: On the Modeling tab, on the far right of the Design section, click the arrow. Under Dependencies, click Dependency Analyzer.
Perform a dependency analysis to examine models, subsystems, and libraries referenced directly or indirectly by the model using model-specific views. For more details, see Analyze Model Dependencies (Simulink).
MATLAB Command Window: Enter
dependencyAnalyzer
.
Examples
Related Examples
Tips
Use the clickable arrows to investigate further dependencies between files.
Use the check boxes in the Legend pane to filter out a group of files.
Use the Add to selection button in the Legend panel to select all files in the graph with the specified legend.
Create a project from the dependency graph. Projects enable you to package, share, or put your design under source control.
To create a project from all the files displayed in the dependency graph, click the graph background. This action clears all selected files.
In the Dependency Analyzer toolstrip, in the Export section, click Create Project.
In the Create Project window, click OK.
The Dependency Analyzer creates a project and reloads the graph.
You can also create a project from a subset of files in the graph. Select the files, then click Create Project. The Dependency Analyzer includes the selected files and all their dependencies in the project.