Syntax
list = depfun('file_name');
[list,builtins,classes] = depfun('file_name');
[list,builtins,classes,prob_files,prob_sym,eval_strings,...
called_from,java_classes] = depfun('file_name');
[...] = depfun('file_name1','file_name2',...);
[...] = depfun('fig_file_name');
[...] = depfun(...,'-toponly');
Description
The depfun
function lists all of the functions and scripts, as well as built-in functions, that a specified M-file needs to operate. This is useful for finding all of the M-files that you need to compile for a MATLAB runtime application.
list = depfun('file_name')
creates a cell array of strings containing the paths of all the files that file_name.m
uses. This includes the second-level files that are called directly by file_name.m
, as well as the third-level files that are called by the second-level files, and so on.
[list,builtins,classes] = depfun('file_name')
creates three cell arrays containing information about dependent functions. list
contains the paths of all the files that file_name
and its subordinates use. builtins
contains the built-in functions that file_name
and its subordinates use. classes
contains the MATLAB classes that file_name
and its subordinates use.
[list,builtins,classes,prob_files,prob_sym,eval_strings,...
creates additional cell arrays or structure arrays containing information about any problems with the
called_from,java_classes] = depfun('file_name') depfun
search and about where the functions in list
are invoked. The additional outputs are:
prob_files
, which indicates which filesdepfun
was unable to parse, find, or access. Parsing problems can arise from MATLAB syntax errors.prob_files
is a structure array whose fields are:name
, which gives the names of the fileslistindex
, which tells where the files appeared inlist
errmsg
, which describes the problemsprob_sym
, which indicates which symbolsdepfun
was unable to resolve as functions or variables. It is a structure array whose fields are:fcn_id
, which tells where the files appeared inlist
name
, which gives the names of the problematic symbolseval_strings
, which indicates usage of these evaluation functions:eval
,evalc
,evalin
,feval
. When preparing a runtime application, you should examine this output to determine whether an evaluation function invokes a function that does not appear inlist
. The outputeval_strings
is a structure array whose fields are:fcn_name
, which give the names of the files that use evaluation functionslineno
, which gives the line numbers in the files where the evaluation functions appearcalled_from
, a cell array of the same length aslist
. This cell array is arranged so that
[...] = depfun('file_name1','file_name2',...)
performs the same operation for multiple files. The dependent functions of all files are listed together in the output arrays.
[...] = depfun('fig_file_name')
looks for dependent functions among the callback strings of the GUI elements that are defined in the .fig
or .mat
file named fig_file_name
.
[...] = depfun(...,'-toponly')
differs from the other syntaxes of depfun in that it examines only the files listed explicitly as input arguments. It does not examine the files on which they depend. In this syntax, the flag '-toponly'
must be the last input argument.
Notes
- If
depfun
does not find a file calledhginfo.mat
on the path, then it creates one. This file contains information about Handle Graphics callbacks. - If your application uses toolbar items from the MATLAB default figure window, then you must include
'FigureToolBar.fig'
in your input todepfun
. - If your application uses menu items from the MATLAB default figure window, then you must include
'FigureMenuBar.fig'
in your input todepfun
. - Because many built-in Handle Graphics functions invoke
newplot
, the list produced bydepfun
always includes the functions on whichnewplot
is dependent: '
matlabroot
\toolbox\matlab\graphics\newplot.m'
'
matlabroot
\toolbox\matlab\graphics\closereq.m'
'
matlabroot
\toolbox\matlab\graphics\gcf.m'
'
matlabroot
\toolbox\matlab\graphics\gca.m'
'
matlabroot
\toolbox\matlab\graphics\private\clo.m'
'
matlabroot
\toolbox\matlab\general\@char\delete.m'
'
matlabroot
\toolbox\matlab\lang\nargchk.m'
'
matlabroot
\toolbox\matlab\uitools\allchild.m'
'
matlabroot
\toolbox\matlab\ops\setdiff.m'
'
matlabroot
\toolbox\matlab\ops\@cell\setdiff.m'
'
matlabroot
\toolbox\matlab\iofun\filesep.m'
'
matlabroot
\toolbox\matlab\ops\unique.m'
'
matlabroot
\toolbox\matlab\elmat\repmat.m'
'
matlabroot
\toolbox\matlab\datafun\sortrows.m'
'
matlabroot
\toolbox\matlab\strfun\deblank.m'
'
matlabroot
\toolbox\matlab\ops\@cell\unique.m'
'
matlabroot
\toolbox\matlab\strfun\@cell\deblank.m'
'
matlabroot
\toolbox\matlab\datafun\@cell\sort.m'
'
matlabroot
\toolbox\matlab\strfun\cellstr.m'
'
matlabroot
\toolbox\matlab\datatypes\iscell.m'
'
matlabroot
\toolbox\matlab\strfun\iscellstr.m'
'
matlabroot
\toolbox\matlab\datatypes\cellfun.dll'
Examples
No comments:
Post a Comment