exportToZip: Identifies the dependencies of an M-file and creates a ZIP file
by Malcolm Wood
11 Apr 2006
(Updated 11 Apr 2006)
Code covered by BSD License
Files inside $matlabroot/toolbox are omitted, providing a useful way to package your work
Download Now
|
Watch this File
|
| File Information |
| Description |
The function "mydepfun" determines the dependencies of an
M-file, ignoring files inside the MATLAB "toolbox" directory. Skipping these files gives significant performance improvements over calling "depfun" directly, especially in MATLAB installations which include multiple toolboxes. The assumption is the same as that in "mypath.m", i.e. that most of us do our work in directories outside $matlabroot/toolbox.
The function "exportToZip" creates a ZIP file containing all the dependencies identified by "mydepfun" for one or more MATLAB functions. This simplifies the process of passing your work to another user, or uploading it to MATLAB Central, by reducing both the effort required and the likelihood of a file being missed out.
The limitations of "depfun" apply: for example, that dependencies introduced by calls such as "eval('peaks')" are not identified. An additional limitation is that if files in the MATLAB toolbox directory somehow depend on files *outside* that directory (e.g.
if you have overloaded toolbox functions), these dependencies will not be picked up as they would by "depfun" itself.
The directory hierarchy is preserved by "exportToZip", which means that all required files must be on the same drive so that a "common root directory" can be determined. |
| Acknowledgements |
The author wishes to acknowledge the following in the creation of this submission:
depfun2, DepSubFun, mypath.m
|
| MATLAB release |
MATLAB 7.2 (R2006a)
|
| Other requirements |
Should work on any platform (though has only been tested on Windows) and any release since R14 (MATLAB 7.*). |
| Zip File Content |
|
| Other Files |
exportToZip.m, mydepfun.m
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (4) |
| 02 Jun 2006 |
mut ante
|
|
|
| 13 Sep 2006 |
Murphy O'Brien
|
|
|
| 26 Sep 2008 |
Tim Tam
|
|
|
| 19 Nov 2008 |
Thierry Dalon
|
|
|
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com