MATLAB: Repeated Use (reuse) of GUI

gui reuse

I have a simple GUI with several pushbuttons, each calling a separate mfile. The first time after evoking the GUI that I press any of these buttons, the function in the realted mfile are executed. But, ever after I get the following error:
??? Undefined function or method 'FastDD' for input arguments of type 'struct'.
Error in ==> @(hObject,eventdata)FastDD('Kvalue_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
where, 'FastDD' being the main GUI and Kvalue being the mfile requested by the second press.
I like to retain the original GUI (FastDD) and use it over and over until I press the exit button. Appreciate any suggestion. Please note that I am a novice in using MATLAB.

Best Answer

Does any of your code use "cd" to change directories? And perhaps fails to "cd" back to the directory that FastDD is in?