MATLAB: When i am running a gui program a window is coming ask me for change the directry

guiMATLAB

i have write a program in matlab gui. when i run the program a window is coming asking for change the directory. i want that this window never comes. how can i solve the problem? please help me. thank you in advance.

Best Answer

Hi,
do you start the GUI out of the ML editor where the M file is open and your current folder is different from the folder where the GUI is located? If so, the editor recognizes this and ask you if you want to change to that folder where the GUI is located since its not an the ML path. Simply change into the folder with the GUI before running it and the message shouldnt appear.