Code covered by the BSD License  

Highlights from
get_function_dependents

5.0

5.0 | 3 ratings Rate this file 1 Download (last 30 days) File Size: 2.27 KB File ID: #8287

get_function_dependents

by Robert M. Flight

 

12 Aug 2005 (Updated 16 Jun 2008)

Creates a directory with all sub functions called by higher function.

| Watch this File

File Information
Description

get_function_dependents(funct_nam,options)

What this function is set up for is when you have written a big function, that depends on a bunch of smaller functions, that you have also written. Someone wants to borrow the function, but you don't know all the sub functions required to run it. If you run this, it will create a sub directory in the current directory with the name 'funct_nam_dir', and copy the main function, and all the user written sub functions into the directory. You can then create a zip file or just copy the directory and give to the person the complete directory, and they should be able to run the function without any problems.

You must specify any toolbox names you want included (if any), and the main MATLAB install directory, (edit these within the file) as we don't want to include files included in the main MATLAB distribution. This function also assumes that the user created functions are not in the MATLAB install directory.

MATLAB release MATLAB 7.0.4 (R14SP2)
Other requirements Uses Matlab 7.02. Should work in both Windows and unix/linux, although I have not tested it on *nix systems. If someone did that, it would be great.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
15 Dec 2005 Amit Shachaf

Do exactly what I needed.
The only thing I would like to fix is that the function doesn't copy figure files that was created with guide.
If you have .fig file you have to copy them manually.
Except of that it is just great.

Amit

14 Nov 2006 turuu turuuuu  
09 Dec 2006 zim zsh

good, better if replace the matDirect with the default var matDirect .

for example:
%matDirect = 'C:\Program Files\MATLAB704'; %% modify by zim.
matDirect = matlabroot;

Please login to add a comment or rating.
Updates
16 Jun 2008

Added functionality of copying .fig files associated with the .m files of GUI applications, and gets matlab root directory automatically.

Tag Activity for this File
Tag Applied By Date/Time
path Robert M. Flight 22 Oct 2008 07:55:53
directories Robert M. Flight 22 Oct 2008 07:55:53
files Robert M. Flight 22 Oct 2008 07:55:53
dependent functions Robert M. Flight 22 Oct 2008 07:55:53
function utility Robert M. Flight 22 Oct 2008 07:55:53
dependent functions Steve Draving 23 Nov 2009 19:52:38

Contact us at files@mathworks.com