This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


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.

    Tip:   In a Simulink® project, you can interactively run dependency analysis. You can find the required toolboxes for the whole project or for selected files. You can see which products a new team member requires to use the project, or find which file is introducing a product dependency. See Find Required Toolboxes.

Input Arguments


Cell array of character vectors 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 =


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.


In a Simulink project, you can interactively run dependency analysis and find the required toolboxes for the whole project or for selected files. See Find Required Toolboxes.

For a model that is not in a project, you can interactively generate a manifest and report. You can create a report to identify where dependencies arise, and control dependency analysis options. See Analyze Model Dependencies.

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

Introduced in R2012a

Was this topic helpful?