Main Content

simscape.dependency.file

Namespace: simscape.dependency

Check dependencies for single file

Syntax

[fn_list, missing] = simscape.dependency.file('fileName')
[fn_list, missing] = simscape.dependency.file('fileName', dependencyType)
[fn_list, missing] = simscape.dependency.file('fileName', dependencyType, isRecursive)
[fn_list, missing] = simscape.dependency.file('fileName', dependencyType, isRecursive, doTMWFile)

Description

[fn_list, missing] = simscape.dependency.file('fileName') returns two cell arrays of character vectors: full path names of existing dependency files, fn_list, and missing files, missing. These cell arrays list the existing and missing files that are needed for the specified Simscape™ file to build successfully, or to correctly visualize and execute in MATLAB®.

[fn_list, missing] = simscape.dependency.file('fileName', dependencyType) returns dependency files of the specified type.

[fn_list, missing] = simscape.dependency.file('fileName', dependencyType, isRecursive) lets you specify whether analysis is recursive on the generated dependency files. By default, returns only the top-level dependency files.

[fn_list, missing] = simscape.dependency.file('fileName', dependencyType, isRecursive, doTMWFile) lets you specify whether to include files inside the MATLAB root folder (installation directory) in the analysis.

Input Arguments

dependencyType

Enumerated value of type simscape.DependencyType, which specifies the type of returned files:

All (default)All the dependency files
AuxiliaryFiles that are not necessary to convert the file and use it in block diagrams, but are needed to visualize it correctly, for example, block icon images
CoreFiles necessary to convert the file and use it in block diagrams, for example, a domain file referenced by the component file being analyzed
DerivedInternally generated files that are not necessary for sharing the component file being analyzed, but including them will avoid rebuilding the library on the same platform.
SimulinkAdditional files that help visualize the block generated from the component file being analyzed. These files are not necessary for simulation.

These enumerated values have the following order: Core, Derived, Auxiliary, Simulink, All. The return is accumulative. This means that for a requested file type, all earlier file types are also returned. For example, if you specify dependencyType as simscape.DependencyType.Derived, the analysis returns both Core and Derived files.

doTMWFile

Logical value that indicates whether the file analysis includes files inside the MATLAB root folder (installation directory):

true (default)
false

fileName

The name of the Simscape file (with path), or class method, for which the dependencies are checked. In case of multiple files with the same name, only the first file of the specified name on the MATLAB path is analyzed.

isRecursive

Logical value that indicates whether the analysis is recursive on the generated dependency files:

true
false (default)

Version History

Introduced in R2009b