realpath
Versión 1.0.0.0 (1,63 KB) por
Anthony Corr
Resolves relative paths and extra filesep characters in the input.
Updated version of realpath by M MA using suggestions made on that file submission and additional testing. Works for Windows, may need some tweaks for Unix. Substantially faster than original version in testing.
Resolves relative paths and extra filesep characters in the input.
Syntax:
OUTPUT = REALPATH(THEPATH)
where THEPATH is the path to a file or folder, which should exist.
Example:
realpath('../myfile.txt');
% returns /home/user/whatever/myfile.txt
Citar como
Anthony Corr (2026). realpath (https://es.mathworks.com/matlabcentral/fileexchange/26360-realpath), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2009b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Más información sobre Search Path en Help Center y MATLAB Answers.
Etiquetas
Agradecimientos
Inspirado por: realpath
Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
| Versión | Publicado | Notas de la versión | |
|---|---|---|---|
| 1.0.0.0 |
