Code covered by the BSD License  

Highlights from
depfun2

1.5

1.5 | 2 ratings Rate this file 1 Download (last 30 days) File Size: 2.05 KB File ID: #6147

depfun2

by Daniel Ennis

 

29 Oct 2004 (Updated 12 Apr 2006)

This function allows one to reduce to results of DEFUN through the use of a keyword.

| Watch this File

File Information
Description

% DEPFUN2 finds the M-file dependencies of an m-file whos
% path also contains a KEYWORD. It relies upon the use of the
% DEPFUN function. DEPFUN2 accepts a keyword to 'grep' for allowing
% the return of m-files that are only found on a specific path (a users
% path for example). The keyword (or part of a word) is used to find
% matches in the full pathname of all files that the m-file depends upon.
%
% SYNTAX: G=depfun2(fname);
% G=depfun2(fname,[]);
% G=depfun2(fname,keyword);
% G=depfun2(fname,keyword,varargin);
%
% fname - The name of the m-file for which to determine dependencies
% keyword - The keyword used to retain m-files whose pathname contains 'keyword'
% DEFAULT keyword is unix('whoami') on UNIX platforms.
% varargin - Any of the various arguments that DEPFUN usually accepts.
%
% Example: G=depfun2('bench','graphics','-quiet','-toponly'); % Returns FEWER results than...
% G=depfun2('bench','graphics','-quiet'); % Because this includes indirectly called m-files
%
%
% On Unix Platforms the DEFAULT of:
% G=depfun2('test');
% Is equivalent to:
% [STATUS,USERNAME]=unix('whoami');
% G=depfun2('test',deblank(USERNAME),'-quiet');

Acknowledgements
This submission has inspired the following:
exportToZip: Identifies the dependencies of an M-file and creates a ZIP file
MATLAB release MATLAB 7 (R14)
Other requirements None that I know of, but I develop on UNIX/OSX. Let me know if there are PC/SUN/etc. problems.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
10 Apr 2006 Malcolm Wood

Doesn't seem to do what the instructions claim. Both of the examples in the M-file help produce an error: "depfun2.M requires two user inputs".

19 Nov 2008 Thierry Dalon

Does not work on Windows.
What is the idea of this keyword?

Please login to add a comment or rating.
Updates
30 Sep 2005

Minor bug fix when entering two variables.

12 Apr 2006

Bug fix. Feature addition.

Tag Activity for this File
Tag Applied By Date/Time
path Daniel Ennis 22 Oct 2008 07:34:21
directories Daniel Ennis 22 Oct 2008 07:34:21
files Daniel Ennis 22 Oct 2008 07:34:21
dependency Daniel Ennis 22 Oct 2008 07:34:21
function Daniel Ennis 22 Oct 2008 07:34:21
mfile Daniel Ennis 22 Oct 2008 07:34:21
utilities Daniel Ennis 22 Oct 2008 07:34:22

Contact us at files@mathworks.com