Code covered by the BSD License  

Highlights from
relativepath.m

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

relativepath.m

by

Jochen Lenz

 

14 Aug 2003 (Updated )

Convert path representations.

| Watch this File

File Information
Description

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 '..\'
 
    Syntax:
       rel_path = RELATIVEPATH( target_path, actual_path )

Acknowledgements

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

Igor

results in lowercase letters...

20 May 2011 Lukas

Lukas

 
16 Apr 2011 David Zhang

David Zhang

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

Comment only
16 Apr 2011 David Zhang

David Zhang

 
16 Apr 2011 David Zhang

David Zhang

 
09 Feb 2010 Ano Nymous

Ano Nymous

worked fine, good examples

01 Nov 2005 Changshun Deng

very good! many thanks!

Contact us