Code covered by the BSD License  

Highlights from


4.8 | 6 ratings Rate this file 15 Downloads (last 30 days) File Size: 2 KB File ID: #3858




14 Aug 2003 (Updated )

Convert path representations.

| Watch this File

File Information

RELATIVEPATH returns the relative path from an actual path to the target path.

Both arguments must be strings with absolute paths. The actual path is optional, if omitted the current dir is used instead. In case the volume drive letters don't match, an absolute path will be returned.

If a relative path is returned, it always starts with '.\' or '..\'
       rel_path = RELATIVEPATH( target_path, actual_path )


This file inspired Fast And Efficient Spectral Clustering and Improved Relativepath.M.

MATLAB release MATLAB 6.0 (R12)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
06 Nov 2011 Igor

results in lowercase letters...

20 May 2011 Lukas  
16 Apr 2011 David Zhang

works great on mac, does it also work on windows?

16 Apr 2011 David Zhang  
16 Apr 2011 David Zhang  
09 Feb 2010 Ano Nymous

worked fine, good examples

01 Nov 2005 Changshun Deng

very good! many thanks!

Contact us