Code covered by the BSD License  

Highlights from
Recursively get file-dependencies of a given function

4.875

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

Recursively get file-dependencies of a given function

by

 

03 Jul 2007 (Updated )

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

| Watch this File

File Information
Description

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

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?

30 Nov 2012 Jamie Guggenheim

Really useful piece of code, seems to work perfectly

05 Jul 2011 Dmitry  
06 May 2011 Thomas Vanaret  
19 Oct 2009 Jurica

Excellent job,

thank you very much :)

26 Aug 2009 Itamar

Hi,

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

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