Code covered by the BSD License  

Highlights from
absolutepath.m

3.66667

3.7 | 3 ratings Rate this file 7 Downloads (last 30 days) File Size: 1.78 KB File ID: #3857

absolutepath.m

by Jochen Lenz

 

14 Aug 2003 (Updated 27 Aug 2003)

Convert path representations.

| Watch this File

File Information
Description

ABSOLUTEPATH returns the absolute path relative to a given startpath.
    The startpath is optional, if omitted the current dir is used instead.
    Both argument must be strings.
 
    Syntax:
       abs_path = ABSOLUTEPATH( rel_path, start_path )

Acknowledgements

This file inspired Absolutepath and Coverage Report Generator.

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
absolute, convert(2), dir, directories(2), files, path, relative
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
30 Jun 2011 Daniel

fails for absolute network paths like \\server\data

20 Dec 2010 Jonathan Karr

Great work! I had the same comments as Bob; the function needed to be modified slightly to work on linux. See http://www.mathworks.com/matlabcentral/fileexchange/29768 for updated function.

13 Sep 2003 Bob Henz

Did what I wanted with little modification but...

1) Shouldn't use lower() function because some systems are case sensitive.

2) Would be nicer if it handled filenames as well.

3) For PCs both '/' and '\' are valid dividers but this only considers filesep (which on PCs is '\') I know this is a PC vs Unix querkiness but might be better to actively convert all '\' AND '/' to the filesep character.

Updates
19 Aug 2003

was wrong file

27 Aug 2003

was wrong file

Contact us