dependencies.toolboxDependencyAnalysis

Find toolbox dependencies

Description

example

names = dependencies.toolboxDependencyAnalysis(files) returns names, a cell array of the toolbox names required by the files in files.

example

[names, folders] = dependencies.toolboxDependencyAnalysis(files) also returns folders, a cell array of the toolbox folders.

Examples

collapse all

Find all the required toolboxes for the model vdp.

files={'vdp'};
names = dependencies.toolboxDependencyAnalysis(files)
names =

  1×2 cell array

    {'Simulink'}    {'Simulink Coder'}

Tip

You can interactively run a dependency analysis. You can find the required toolboxes for the entire project, for selected files, or for a model. You can see which products a new team member requires to use the design, or find which file is introducing a product dependency. See Find Required Products and Toolboxes.

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

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

names{:}
ans =

  2×1 cell array

    {'Simulink'      }
    {'Simulink Coder'}

Find the names and folders of the required toolboxes for the model vdp.

files={'vdp'};
[names, folders] = dependencies.toolboxDependencyAnalysis(files)
names =

  1×2 cell array

    {'Simulink'}    {'Simulink Coder'}


folders =

  1×2 cell array

    {'simulink'}    {'simulinkcoder'}

Input Arguments

collapse all

Names of files on the MATLAB® path or full paths to files, specified as a cell array of strings.

Output Arguments

collapse all

Toolbox names required by the files in files, returned as a cell array of character vectors.

(Optional) Required toolbox folders, returned as a cell array of character vectors.

Introduced in R2012a