Quick answer: None.
Depfun would be my first guess as a solution to this problem, but it gives you a list of dependencies that exist on the path, and not those that don't exist. Similarly, mlint and mlintmex are not as useful for this as I would hope.
I believe the reason for this is this: the syntax for function calls and indexes is identical in MATLAB.
The only way to find out if foo (bar) is a function call for "foo.m" or an attempt to index into the "foo" matrix is ββto execute the code to this point and see if the "foo" matrix exists in scope and / or if foo .m exists on the way. If they exist, then MATLAB precedence rules decide whether the "foo" character will be considered as a function call or as a signature operation.
In the following toy example, the expression "ambiguous (1: 9)" is first processed as a function call, and then as a signature operation:
function test disp( ambiguous( 1:9 ) ) ambiguous = 'data item'; disp( ambiguous( 1:9 ) ) end function szMsg = ambiguous( anArgument ) szMsg = 'function call'; end
You can also create variables using eval and evalin , and also control the MATLAB path to transfer m files to and from scope. These reasons are all conspired to make the solution to this problem impractical (and possibly even impossible) for the general case.
source share