views:

126

answers:

1

I'm trying to find a function (or make one) that lists all the dependent functions, including ones that are not on the MATLAB path. I already tried using depfun(fun) along with all of its flags but it does not list the dependent functions that are not on my paths. Any help would be greatly appreciated.

+1  A: 

The fourth output from DEPFUN (prob_files) should list functions that DEPFUN was unable to find, parse, or access. This should include functions that are not on the MATLAB path. If they aren't on the path, then MATLAB won't be able to find where they are located. You will instead have to locate the function files using system commands (like DIR for Windows, for example), which you can call from MATLAB using the SYSTEM command or the ! (bang) operator. One caveat is that the file containing the function may need to have the same name as the function.

I would also check out two functions on The MathWorks File Exchange from Urs Schwarz: FDEP and FARG. These should help you find unresolved function calls, but you may still have to locate the function files using system commands.

gnovice