MATLAB: GUI error in non-existing gui item

guiguider2016b

Hello,
Running MATLAB R2016B on Windows 10
I am currently creating my first GUI with Matlab. It was all working fairly well, until I deleted some items from the .fig in guide. Now my code GUI.m code still contains all the deleted items that have ever existed in the GUI.fig. I tried deleting them since it takes up about 600 lines of code and they don't even exist in the .fig file. However, when I try to run the GUI I get the following error: Undefined function or variable 'edit1_CreateFcn'.
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in GUI (line 43) gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)GUI('edit1_CreateFcn',hObject,eventdata,guidata(hObject))
I have attached my code and the .fig file. I have commented out all the functions for items that do not exist in the .fig. If I want to get rid of all my errors I would have to leave all that code in.
Hope someone knows what I am doing wrong here. Thanks!

Best Answer

You erroneously commented out the edit1 create function at line 328 but you are still using the edit field control in the :Input file" panel as you can see in GUIDE. Put the code back in.