MATLAB: How to allow a user of the GUI to load data from a specific location in MATLAB

fileloadlocationMATLABspecifieduser

I would like to perform a load data into the MATLAB workspace from a *.mat file. I would like to do this from a GUI button click.

Best Answer

This can be done by allowing the user to specify the file location by using the UIGETFILE command.
The following example lets user locate and then load workspace from the MAT file.
[file,path] = uigetfile('*.mat','Load workspace from')
load([path file])