Find toolbox dependencies


names = dependencies.toolboxDependencyAnalysis(files_in)
[names, folders] = dependencies.toolboxDependencyAnalysis(files_in)


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

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

Input Arguments


Cell array of strings containing .m, .mdl, or .slx files on the MATLAB® path. Simulink® model names (without file extension) are also allowed.

Default: [ ]

Output Arguments


Cell array of toolbox names required by the files in files_in.


(Optional) Cell-array of the required toolbox folders.


The following code reports the detectable required toolboxes for the model vdp:

names = dependencies.toolboxDependencyAnalysis(files_in)
names = 

    'MATLAB'    'Simulink'    'Simulink Coder'

To find all detectable toolbox dependencies of your model and the files it depends on:

  1. Call fileDependencyAnalysis on your model.

    For example:

    files = dependencies.fileDependencyAnalysis('mymodel')
    files = 
  2. Call toolboxDependencyAnalysis on the files output of step 1.

    For example:

    tbxes = dependencies.toolboxDependencyAnalysis(files)
    tbxes = 
    [1x24 char]    'MATLAB'    'Simulink Coder'    'Simulink'

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

    ans =
    Image Processing Toolbox
    ans =
    ans =
    Simulink Coder
    ans =


You can interactively run dependency analysis from the Simulink project. See Run Dependency Analysis.

To create a report to identify where dependencies arise, and for more control over dependency analysis options, you can interactively generate a manifest and report. See Analyze Model Dependencies.

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

More About

collapse all


The function dependencies.toolboxDependencyAnalysis looks for toolbox dependencies of the files in files_in but does not analyze any subsequent dependencies. See Examples.

For command-line dependency analysis, the analysis uses the default settings for analysis scope to determine required toolboxes. For example, if you have code generation products, then the check Find files required for code generation is on by default and Simulink Coder™ is always reported as required. See Required Toolboxes in the manifest documentation for more examples of how your installed products and analysis scope settings can affect reported toolbox requirements.

Introduced in R2012a

Was this topic helpful?