MATLAB: How to use uigetfile to get the file path

Hello, I was wondering if I could use the function uigetfile to get the complete file path string.

Best Answer

The documentation for uigetfile() is remiss in not showing any examples that use fullfile() to construct the full file name of the chosen file. Here is how you do it:
[baseName, folder] = uigetfile();
fullFileName = fullfile(folder, baseName)