Unrecognized function or variable 'axes34_CreateFcn'.

1 view (last 30 days)
I have face below error while i i'm running my coding
Unrecognized function or variable 'axes34_CreateFcn'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in gui (line 40)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)gui('axes34_CreateFcn',hObject,eventdata,guidata(hObject))
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Below is my coding
function varargout = gui(varargin)
% GUI M-file for gui.fig
% GUI, by itself, creates a new GUI or raises the existing
% singleton*.
%
% H = GUI returns the handle to a new GUI or the handle to
% the existing singleton*.
%
% GUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in GUI.M with the given input arguments.
%
% GUI('Property','Value',...) creates a new GUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before gui_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to gui_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help gui
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @gui_OpeningFcn, ...
'gui_OutputFcn', @gui_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin & isstr(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
function gui_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
a=imread('min.bmp');
axes(handles.axes34);
imshow(a);
axes(handles.axes35);
imshow(a);
axes(handles.axes36);
imshow(a);
axes(handles.axes37);
imshow(a);
axes(handles.axes38);
imshow(a);
axes(handles.axes39);
imshow(a);
axes(handles.axes40);
imshow(a);
axes(handles.axes41);
imshow(a);
axes(handles.axes42);
imshow(a);
axes(handles.axes43);
imshow(a);
axes(handles.axes44);
imshow(a);
axes(handles.axes45);
imshow(a);
axes(handles.axes46);
imshow(a);
axes(handles.axes47);
imshow(a);
axes(handles.axes48);
imshow(a);
axes(handles.axes49);
imshow(a);
axes(handles.axes50);
imshow(a);
axes(handles.axes51);
imshow(a);
axes(handles.axes52);
imshow(a);
axes(handles.axes53);
imshow(a);
axes(handles.axes54);
imshow(a);
axes(handles.axes55);
imshow(a);
axes(handles.axes56);
imshow(a);
axes(handles.axes57);
imshow(a);
axes(handles.axes58);
imshow(a);
axes(handles.axes59);
imshow(a);
axes(handles.axes60);
imshow(a);
axes(handles.axes61);
imshow(a);
axes(handles.axes62);
imshow(a);
axes(handles.axes63);
imshow(a);
b=imread('max.bmp');
axes(handles.one);
imshow(b);
guidata(hObject, handles);
function varargout = gui_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;
function Load_Database_Callback(hObject, eventdata, handles)
a=exist('database.txt');
if a>0
msg='Database Already Loaded';
set(handles.edit1,'string',msg)
else
fid = fopen('database.txt', 'w+');
for i=1:100
a=num2str(i);
b='.jpg';
c1='.bmp';
filename=strcat(a,c1);
fprintf(fid,'%s\r',filename);
end
fclose(fid);
msg='Database Succesfully Loaded...';
set(handles.edit1,'string',msg)
end
function Browse_Callback(hObject, eventdata, handles)
[filename, pathname] = uigetfile('*.bmp', 'Pick an Image');
if isequal(filename,0) | isequal(pathname,0)
msg='Image is Not Selected';
set(handles.edit1,'string',msg)
else
a=imread(filename);
handles.queryx=a;
axes(handles.one);
imshow(a);
handles.filename=filename;
guidata(hObject, handles);
msg='Input Image is Selected';
set(handles.edit1,'string',msg)
end
function Search_Callback(hObject, eventdata, handles)
filename=handles.filename;
[X1] = imread(filename);
% Apply Principal Component Analysis with eigen values
pca
M1 = imread('1.bmp');
M2 = imread('2.bmp');
M1=double(M1);
M2=double(M2);
% check inputs
[z1 s1] = size(M1);
[z2 s2] = size(M2);
if (z1 ~= z2) | (s1 ~= s2)
error('Input images are not of same size');
end;
[X] = imread([pathname,imagename]);
HSVmap = rgb2hsv(X);
[D1,D2,D3] = quadratic1(X1, HSVmap1, X, HSVmap);
resultValues1(i) = D1;
resultValues2(i) = D2;
resultValues3(i) = D3;
resultNames(j) = {imagename};
i = i + 1;
j = j + 1;
end
fclose(fid);
[sortedValues1, index1] = sort(resultValues1);
[sortedValues2, index2] = sort(resultValues2);
[sortedValues3, index3] = sort(resultValues3);
for i = 1:10
tempstr = char(resultNames(index1(i)));
if i==1;
x=imread(tempstr);
axes(handles.axes34);
imshow(x);
end
if i==2
x=imread(tempstr);
axes(handles.axes35);
imshow(x);
end
if i==3
x=imread(tempstr);
axes(handles.axes36);
imshow(x);
end
if i==4
  3 Comments
Rik
Rik on 14 Oct 2019
This seems like a GUI that is much too complex to handle only with GUIDE. Have a read on this thread for more information and tips for alternatives.
Nadiah Yusof
Nadiah Yusof on 15 Oct 2019
@Ankit... thank you Ankit, i have try to rename it and got the different error... i try reload again the old version of my code and edit from that.
@Rik Thank you Rik, i will refer the link you gave to me.

Sign in to comment.

Answers (1)

Adam
Adam on 14 Oct 2019
Unless you have explicitly created one axes don't have a createFcn set by default, so I assume you must have asked it to create one at some point then deleted it. You should be able to just go to the Property Inspector for your axes34 and delete whatever is in the CreateFcn field, leaving it blank.
And if you have done this for all your axes you'll have to do the same for all of them too.

Tags

Community Treasure Hunt

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

Start Hunting!