I Don't Know Why I am Getting This Error Matlab GUI

3 views (last 30 days)
I Have The Following COde as Below But I Doesn't Works I don't Know Why
function Extras_OpeningFcn(hObject, ~, handles, varargin)
handles.output = hObject;
handles.nOfClasses = 0;
handles.imagesInClass = 0;
handles.row_col_dimension = 10;
% Update handles structure
handles.testImgPerClass = 0;
handles.accuracy = 0;
guidata(hObject, handles);
function testDataBase_pushButton_Callback(~, ~, handles)
handles.nOfClasses = str2double(get(handles.nOfClass_textBox , 'string'));
pb_value = get(handles.traningImgSize_popUp,'Value');
handles.imagesInClass = str2double(get(handles.imagesPerClass_textBox,'string'));
handles.testImgPerClass = str2double(get(handles.testImagePerPerson_textBox,'string'));
set(handles.percentAccuracy_textBox ,'string', int2str(handles.accuracy));
guidata(hobject ,handles);
It Gives me this error//////
Error using feval
Undefined function 'imagesPerClass_textBox_CreateFcn' for input arguments of type
'matlab.ui.control.UIControl'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in Extras (line 17)
gui_mainfcn(gui_State, varargin{:});
Error in
@(hObject,eventdata)Extras('imagesPerClass_textBox_CreateFcn',hObject,eventdata,guidata(hObject))
Error using feval
Undefined function 'percentAccuracy_textBox_CreateFcn' for input arguments of type
'matlab.ui.control.UIControl'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in Extras (line 17)
gui_mainfcn(gui_State, varargin{:});
Error in
@(hObject,eventdata)Extras('percentAccuracy_textBox_CreateFcn',hObject,eventdata,guidata(hObject))
Error using feval
Undefined function 'testImagePerPerson_textBox_CreateFcn' for input arguments of type
'matlab.ui.control.UIControl'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in Extras (line 17)
gui_mainfcn(gui_State, varargin{:});
Error in
@(hObject,eventdata)Extras('testImagePerPerson_textBox_CreateFcn',hObject,eventdata,guidata(hObject))
Error using feval
Undefined function 'nOfClass_textBox_CreateFcn' for input arguments of type
'matlab.ui.control.UIControl'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in Extras (line 17)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)Extras('nOfClass_textBox_CreateFcn',hObject,eventdata,guidata(hObject))
Error using feval
Undefined function 'traningImgSize_popUp_CreateFcn' for input arguments of type
'matlab.ui.control.UIControl'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in Extras (line 17)
gui_mainfcn(gui_State, varargin{:});
Error in
@(hObject,eventdata)Extras('traningImgSize_popUp_CreateFcn',hObject,eventdata,guidata(hObject))
  2 Comments
pshtiwan karim
pshtiwan karim on 13 Apr 2018
Undefined function 'func_loadScan' for input arguments of type 'matlab.ui.control.UIControl'.
Error while evaluating UIControl Callback.
Walter Roberson
Walter Roberson on 13 Apr 2018
pshtiwan karim, the code the user posted has no reference to func_loadScan ?

Sign in to comment.

Answers (1)

Geoff Hayes
Geoff Hayes on 21 Mar 2015
Muhammad - it appears that you are missing the functions to create the controls for the following
testImagePerPerson_textBox
traningImgSize_popUp
nOfClass_textBox
imagesPerClass_textBox
percentAccuracy_textBox
If you don't need the CreateFcn for each of the above, then use GUIDE to open the Property Inspector for each of these controls and remove/clear the CreateFcn for each. Then save the changes and try running your GUI again.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!