After adding the full path of the subroutine, recompile the code, and ran the mainroutine.exe file, I still got the following errors. I didn't get any error by runing the mainroutine.m through Matlab.
Error using run (line 56)
subroutine.m not found
Error in mainroutine>file_open_Callback (line 546)
Error in gui_mainfcn (line 96)
Error in mainroutine (line 42)
Error in @(hObject, eventdata)mainroutine('file_open_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
