View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Recursively get file-dependencies of a given function

4.9 | 8 ratings Rate this file 3 Downloads (last 30 days) File Size: 2.55 KB File ID: #15484 Version: 1.0

Recursively get file-dependencies of a given function



03 Jul 2007 (Updated )

This function searches recursively for all files dependent to a given function (excluding matlabroo

| Watch this File

File Information

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'));

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
05 Mar 2014 David Young

David Young (view profile)

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?

Comment only
30 Nov 2012 Jamie Guggenheim

Really useful piece of code, seems to work perfectly

05 Jul 2011 Dmitry

Dmitry (view profile)

06 May 2011 Thomas Vanaret

19 Oct 2009 Jurica

Jurica (view profile)

Excellent job,

thank you very much :)

26 Aug 2009 Itamar

Itamar (view profile)


Thanks alot for sharing! Works great for me. Very easy to use and understand.
Simon Robinson, thanks for the tip!

22 Jul 2009 Brent Ware

seems to be broken in 2009b...

03 Feb 2009 Simon Robinson

Simon Robinson (view profile)

Great - does what it says on the packet. Good for preparing MATLAB submissions...
file_list = getFileDependencies(ProgramName);
zip(ArchiveName, file_list);

04 Jul 2007 Ayal Anis

Although haven't tested extensively, it appears to be very useful (especially for unorganized coders...)

Contact us