This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function absPath = absfilepath(inPath) | |
% absfilepath(inPath) | |
% Get absolute path of a file or a folder | |
% | |
% Java File class is used. | |
% | |
% EXAMPLE | |
% absfilepath('.') %reults in '/mnt/c/Users/me/MATLAB' | |
% | |
javaFileObj = java.io.File(inPath); | |
absPath = char(javaFileObj.getCanonicalPath()); |