getFileDependencies('funcName') recursively calls the MATLAB-function 'depfun' to find the files dependent to the given function. It filters out all dependendies on files from matlabroot.
The function returns a filename-list as cell-Array that can be used for example in setting up a job in the Distributed Computing Toolbox:
set(job, 'fileDependencies', getFileDependencies('myFunc'));
I'm having difficulty seeing what advantage this gives me over calling depfun and then deleting the files in matlabroot from the result. depfun is already recursive, and it looks like you disable this feature then replace it with your own code to traverse the dependency tree. I'm wondering if I've missed something and whether there is some non-apparent advantage?
Really useful piece of code, seems to work perfectly
thank you very much :)
Thanks alot for sharing! Works great for me. Very easy to use and understand.
Simon Robinson, thanks for the tip!
seems to be broken in 2009b...
Great - does what it says on the packet. Good for preparing MATLAB submissions...
file_list = getFileDependencies(ProgramName);
Although haven't tested extensively, it appears to be very useful (especially for unorganized coders...)
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.