I have a GUI window with only two push buttons. Upon clicking the first, the callback will generate a uidir to select a folder from which to work. Then the file will be reformatted and saved as a collection of smaller files. This works well. The other pushbutton is simply intended to close this current window and open another. The problem is that when I open the figure and press pushbutton one i get the following error:
Undefined function 'Window_one' for input arguments of type 'char'.
Error in @(hObject,eventdata)Window_one('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
I have not used the handles structure in this window as there are no variable shared between callbacks and there is no figure to update. In my experience a shortage of or mistake in the declaration of handles is the reason for this error so I am slightly confused as to what the error might be caused by. Does anyone have any idea what may cause this error to arise? There are no cases on Mathworks answers of this having arisen in the same scenario with the error occurring with a GUI window.
I have attached the code along with this question