Main Content

dependencies.toolboxDependencyAnalysis

Find products required by file

Description

names = dependencies.toolboxDependencyAnalysis(files) returns the names of the products required by files.

example

[names, folders] = dependencies.toolboxDependencyAnalysis(files) also returns the folders of the required products in the MATLAB® installation.

example

Examples

collapse all

Find all the required products for the opened model vdp.

openExample("vdp.slx");
names = dependencies.toolboxDependencyAnalysis(bdroot)
names =

  1×1 cell array

    {'Simulink'}

To view long product names, examine the names cell array as follows:

productName = names{:}
productName =

    'Simulink'

Find the names and folders of the required products for the opened model vdp.

openExample("vdp.slx");
[productName,installFolder] = dependencies.toolboxDependencyAnalysis(bdroot)
productName =

  1×1 cell array

    {'Simulink'}


installFolder =

  1×1 cell array

    {'simulink'}

Input Arguments

collapse all

Full path of the files to analyze specified as a string scalar, a string array, or as a cell array of vectors. The path must include the file extension.

Example: "C:\Workspace\Functions\setup.m", fullfile(pwd,"models","myModel.slx")

Output Arguments

collapse all

Name of the products required by the files in files, returned as a cell array of character vectors.

(Optional) Name of the required product folders in the MATLAB installation, returned as a cell array of character vectors.

Tips

  • You can interactively run a dependency analysis using the Dependency Analyzer. You can find the required products and add-ons for the entire project, for selected files, or for a model. You can see which products and add-ons a new team member requires to use the design, or find which file or block is introducing a product dependency. For more information, see Find Required Products and Add-Ons.

  • You can generate a dependency report using the Dependency Analyzer. The report lists the required products for your files, models, and blocks. For more information, see Export Dependency Analysis Results.

Version History

Introduced in R2012a