MATLAB: Browsing & Setting current directory in static text in GUI

MATLABmatlab gui

Hi. I am new to GUI. Please help me.
I have a GUI, i want upon pressing browse button,it should ask for a path and set that path as current working directory path.

Best Answer

users_choice = uigetdir('Select a directory');
cd(users_choice);