1.0

1.0 | 1 rating Rate this file 8 downloads (last 30 days) File Size: 903 Bytes File ID: #7764

AddRecursivePath

by Michael Robbins

 

01 Jun 2005 (Updated 03 Jun 2005)

No BSD License  

Adds the directory specified and all subdirectories to the path.

Download Now | Watch this File

File Information
Description

This function was created before GenPath and may be helpful to those who do not have it.

It is useful to put this function in your STARTUP.M file, so you can automatically add direcories to your path when you launch MATLAB. This way, even if your directory structure has changed, you will still include all your m-files.

Example:
AddRecursivePath('c:\dev\MATLAB');

MATLAB release MATLAB 5.2 (R10)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
18 Jun 2009 Joerg Bretschneider

I was not able to run this on Matlab 6.1, so Release 5.2 seems to be an error. Matlab 6.5 has regexp, but one which doesn#t support 3 argins.
Nevertheless the mfile is very simplistic, all subdirectories are used, but only the first level of a possible tree, and certain directories like @ or private or ., .. are included.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
path Michael Robbins 22 Oct 2008 07:49:45
directories Michael Robbins 22 Oct 2008 07:49:45
files Michael Robbins 22 Oct 2008 07:49:45
what Michael Robbins 22 Oct 2008 07:49:45
cd Michael Robbins 22 Oct 2008 07:49:45
dir Michael Robbins 22 Oct 2008 07:49:45
addpath Michael Robbins 22 Oct 2008 07:49:45
rmpath Michael Robbins 22 Oct 2008 07:49:45
genpath Michael Robbins 22 Oct 2008 07:49:45
pathtool Michael Robbins 22 Oct 2008 07:49:45
savepath Michael Robbins 22 Oct 2008 07:49:45
 

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