MATLAB: How to make the browse pushbutton on the GUI in Matlab functional

#browsepushbutton

Code:
FileName = 'kWilliams.txt';
FileName;FilePath = uigetfile();
ExPath = [FilePath FileName];
Currently, it opens up the windows gui that "select file to open". However, when I try to select a file and open the file everthing just disappears

Best Answer

[FileName,FilePath ]= uigetfile();
ExPath = fullfile(FilePath, FileName)