how to eliminate gui_mainfcn(gui_State, varargin{:}); error

code file is attached
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> test1 at 41 gui_mainfcn(gui_State, varargin{:});

4 Comments

This is code created by the GUIDE gui package.
The question is typically asked for Octave. Are you running Octave instead of Matlab. Matlab doesn't usually have this problem.
How to resolve this error in octave?kindly tell us.
The cause of this particular Question was that a .fig file had been used that did not match the .m code. The user had the .m code from a project but not the .fig file and was trying to create the matching .fig file.
If that is not your situation then you should create a new Question with the complete MATLAB error message. (This is not an Octave resource; octave-specific errors often do not get investigated here.)
gui_mainfcn(gui_state, varargin {:});

Sign in to comment.

Answers (2)

Insufficient information. We need the entire content of the error message.
Some people might suspect that this is the same question as http://uk.mathworks.com/matlabcentral/answers/262320-how-to-eliminate-the-uicontrol-callback-error, but of course you would not post the same question twice so we cannot use that question to guess about the missing information for this question.

3 Comments

ohk got it
i am posting the error part
Click here if you do not want to see this message again.
Initiating matching...
Calibrating procedures...
... ... ...
matching...
??? Reference to non-existent field 'result'.
Error in ==> test1>pushbutton1_Callback at 151
set(handles.result,'String',total_matched_percentage);
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> test1 at 41
gui_mainfcn(gui_State, varargin{:});
Error in ==>
@(hObject,eventdata)test1('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
>>
How does this differ from http://uk.mathworks.com/matlabcentral/answers/262320-how-to-eliminate-the-uicontrol-callback-error ? I am not going to investigate the same problem twice, and if this is the same question as before then this present question will need to be deleted as a duplicate question in which case it would be inappropriate to respond here.
ok i mam really sorry for this i am deleting this question asap you can comment on previous question

Sign in to comment.

its easy to solve this problem, just check what you add to the GUI AS MENU OR BUTTON and you delete the his code at the main file ,just delete it and create again

Asked:

on 1 Jan 2016

Commented:

on 10 May 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!