salut !

J'ai un interface qui contient 2 axes et deux boutons, quand j'appuie sur le bouton browse l'image 1 s'affiche dans l'axes1 le problème c'est que je n'arrive pas à afficher l'image2 dans l'axes2

j'ai essayé avec ce code pour l'image 1
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
function pushbutton1_Callback(hObject, eventdata, handles)
[filename, pathname] = uigetfile('*.jpg', ' Image');
axes(handles.axes1)
imgpath=STRCAT(pathname,filename);
im1 = imread(imgpath);
imshow(im1)
et ça marche bien

et pour l'image2 j'ai essayé ça
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
function pushbutton2_Callback(hObject, eventdata, handles)
axes(handles.axes2);
im2=imread(STRCAT('C:\Users\DeLL\S',num2str(num),'\1.jpg'));
imshow(im2);
mais il m'affiche une erreur

??? Reference to non-existent field 'axes2'.

Error in ==> resultat>pushbutton2_Callback at 161
axes(handles.axes2);

Error in ==> gui_mainfcn at 95
feval(varargin{:});

Error in ==> recognition at 42
gui_mainfcn(gui_State, varargin{:});

??? Error using ==> resultat('pushbutton2_Callback',gcbo,[],guidata(gcbo))
Reference to non-existent field 'axes2'.

??? Error while evaluating uicontrol Callback
Pouvez-vous m'aider s'il-vous plait
je serais très reconnaissante