MATLAB Function Reference Previous page   Next Page

List dependencies of M-file or P-file



The depfun function lists the paths of all files a specified M-file or P-file needs to operate.

list = depfun('fun') creates a cell array of strings containing the paths of all the files that function fun uses. This includes the second-level files that are called directly by fun, and the third-level files that are called by the second-level files, and so on.

Function fun must be on the MATLAB path, as determined by the which function. If the MATLAB path contains any relative directories, then files in those directories will also have a relative path.

[list, builtins, classes] = depfun('fun') creates three cell arrays containing information about dependent functions. list contains the paths of all the files that function fun and its subordinates use. builtins contains the built-in functions that fun and its subordinates use. classes contains the MATLAB classes that fun and its subordinates use.

[list, builtins, classes, prob_files, prob_sym, eval_strings,...
called_from, java_classes] = depfun('fun')
creates additional cell arrays or structure arrays containing information about any problems with the depfun search and about where the functions in list are invoked. The additional outputs are

[...] = depfun('fun1', 'fun2',...) performs the same operation for multiple functions. The dependent functions of all files are listed together in the output arrays.

[...] = depfun({'fun1', 'fun2', ...}) performs the same operation, but on a cell array of functions. The dependent functions of all files are listed together in the output array.

[...] = depfun('fig_file') looks for dependent functions among the callback strings of the GUI elements that are defined in the figure file named fig_file.

[...] = depfun(..., options) modifies the depfun operation according to the options specified (see table below).

Computes all possible left-side arguments and displays the results in the report(s). Only the specified arguments are returned.
Returns a call list in place of a called_from list. This is derived from the called_from list as an extra step.
Includes both indices and full paths in the call or called_from list.
'-print', 'file'
Prints a full report to file.
Displays only error and warning messages, and not a summary report.
Examines only the files listed explicitly as input arguments. It does not examine the files on which they depend.
Outputs additional internal messages.


See Also


Previous page  depdir det Next page

© 1994-2005 The MathWorks, Inc.