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'}

Tip

You can interactively run a dependency analysis. 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 is introducing a product dependency. See Find Required Products and Add-Ons.

To programmatically check which files are required, see dependencies.fileDependencyAnalysis.

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.

Version History

Introduced in R2012a