MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

{pList.Name}'


ans =


'MATLAB'
'Image Processing Toolbox'


The file, myFun.m, requires both MATLAB and the Image Processing Toolbox.


Dependencies Within a Folder


The Dependency Report shows dependencies among MATLAB code files in a folder. Use
this report to determine:



  • Which files in the folder are required by other files in the folder

  • If any files in the current folder will fail if you delete a file

  • If any called files are missing from the current folder


The report does not list:



  • Files in the toolbox/matlab folder because every MATLAB user has those files.


Therefore, if you use a function file that shadows a built-in function file, MATLAB
excludes both files from the list.


  • Files called from anonymous functions.

  • The superclass for a class file.

  • Files called from eval, evalc, run, load, function handles, and callbacks.


MATLAB does not resolve these files until run time, and therefore the Dependency
Report cannot discover them.


  • Some method files.


The Dependency Report finds class constructors that you call in a MATLAB file.
However, any methods you execute on the resulting object are unknown to the report.
These methods can exist in the classdef file, as separate method files, or files
belonging to superclass or superclasses of a method file.

To provide meaningful results, the Dependency Report requires the following:



  • The search path when you run the report is the same as when you run the files in the
    folder. (That is, the current folder is at the top of the search path.)


Identify Program Dependencies
Free download pdf