Be the first to rate this file! 143 downloads (last 30 days) File Size: 1.29 KB File ID: #23603

fullpath

by Oliver Woodford

 

08 Apr 2009 (Updated 16 Oct 2009)

Code covered by BSD License  

Generates a full path from a partial or relative path

Download Now | Watch this File

File Information
Description

This function generates a full path to a file or directory (which need not exist, though the parent directory should), given a partial or relative path with respect to the current directory.

MATLAB release MATLAB 7.5 (R2007b)
Zip File Content  
Other Files fullpath.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
16 Oct 2009 Julian

You say that the directory need not exist but I found this not to be the case when using CD myself a while ago to do much the same thing (but less concise than your nice function). Is this correct?

16 Oct 2009 Oliver Woodford

Thanks Julian. To be correct, I should say that every directory except the bottom level file or directory must exist. I.e. only the bottom level directory is allowed to be non-existant.

Please login to add a comment or rating.
Updates
16 Oct 2009

Comments updated to correct an inaccuracy pointed out by Julian (Thanks!).

Tag Activity for this File
Tag Applied By Date/Time
full path Oliver Woodford 09 Apr 2009 09:31:35
pathname Oliver Woodford 09 Apr 2009 09:31:35
directory Oliver Woodford 09 Apr 2009 09:31:35
file Oliver Woodford 09 Apr 2009 09:31:35
path Oliver Woodford 09 Apr 2009 09:31:35
partial Oliver Woodford 09 Apr 2009 09:31:35
relative Oliver Woodford 09 Apr 2009 09:31:35
 

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