You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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 )
Cite As
Jochen Lenz (2026). relativepath.m (https://au.mathworks.com/matlabcentral/fileexchange/3858-relativepath-m), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired: Fast and efficient spectral clustering, Improved relativepath.m
General Information
- Version 1.0.0.0 (2 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
