Je débute en matlab et je suis entrain de créer une interface graphique pour mon application. Je trouve un problème dans mon code: je veux afficher une image dans une zone bien déterminé (axe) après l’appui du bouton Exécution mais rien n’est afficher et je n’arrive pas à trouver le problème.
Je vous file ici mon code:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
function fig = FM(action)
 
load FM;
 
if nargin<1,
  action='initialize';
end;
 
if strcmp(action,'initialize'),
   oldFigNumber=watchon;
 
   begin;
 
  figNumber=figure( ...
  'Name','Image and Color Map', ...
  'Color', [.8 .8 .8], ...
  'NumberTitle','off', ...
  'Color', 'black', ...
  'DoubleBuffer', 'on', ...
  'Visible','off');
 
 
h0 = figure('Number','off',...  
	'Name','application', ...
	'PointerShapeCData',mat1, ...
   'Position',[252 286 800 680], ...
   'Tag','Fig1', ...
   'Resize','on', ...
	'UserData',mat2);
 
hp = uipanel('Title','Entrées','FontSize',12,'FontWeight','bold',...
             'Position',[.023 .53 .95 .45]);
 
hp1 = uipanel('Title','Info','FontSize',12,'FontWeight','bold',...
             'Position',[.7 .8 .2 .1]);
 
hp2 = uipanel('Title','Sorties','FontSize',12,'FontWeight','bold',...
             'Position',[.023 .07 .95 .45]);
 
 
h1 = uicontrol('Parent',hp, ...
   'Units','points', ...
 	'BackgroundColor',[0.5 0.5 0.7], ...
	'ListboxTop',0, ...
   'Position',[30 100 90 100], ...
   'Style','text', ...
   'Tag','StaticText1');
 
h1 = uicontrol('Parent',hp, ...
   'Units','points', ...
 	'BackgroundColor',[0.5 0.5 0.7], ...
	'ListboxTop',0, ...
   'Position',[425 80 86 40], ...
   'Style','text', ...
   'Tag','StaticText1');
 
h1 = uicontrol('Parent',h0, ...
   'Units','points', ...
 	'BackgroundColor',[0.5 0.5 0.7], ...
	'ListboxTop',0, ...
   'Position',[190 1 200 31], ...
   'Style','text', ...
   'Tag','StaticText1');
 
Mlistehandle = uicontrol('Parent',hp, ...
   'Units','points', ...
   'BackgroundColor',[1 0.7 0.9], ...
   'Callback','FM(''Selec'')', ...
   'Position',[32 127 86 68], ...
   'String',tab2, ...
   'Style','listbox', ...
   'Tag','Listbox1', ...
   'Value',3);
 
Menuhandle = uicontrol('Parent',hp, ...
   'Units','points', ...
   'BackgroundColor',[0 0 0.25], ...
	'Callback','FM(''bin'')', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[600 170.25 66.75 19.5], ...
	'String',[''], ...
	'Style','text', ...
	'Tag','StaticText3', ...
   'Value',1)
   ;
 
h1 = uicontrol('Parent',hp, ...
'Units','points', ...
 'ListboxTop',0, ...
 'Position',[35 105 80 15], ...
 'String','Sélection Images', ...
 'Style','text', ...
 'Tag','StaticText3');
 
lancerhandle = uicontrol('Parent',hp, ...
   'Units','points', ...
	'Callback','FM(''lancer'')', ...
	'ListboxTop',0, ...
	'Position',[433 87  69 26], ...
	'String','Exécution', ...
   'Tag','Pushbutton1');
 
infohandle = uicontrol('Parent',h0, ...
   'Units','points', ...
	'Callback','helpwin', ...
	'ListboxTop',0, ...
	'Position',[212 3 69 26], ... 
	'String','Aide', ...
	'Tag','Pushbutton1');
 
quitterhandle = uicontrol('Parent',h0, ...
   'Units','points', ...
	'Callback','close(gcf)', ...
	'ListboxTop',0, ...
	'Position',[299 3 69 26], ...
	'String','Quitter', ...
   'Tag','Pushbutton2');
 
 
hp3 = uipanel('Title','Info','FontSize',12,'FontWeight','bold',...
             'Position',[.7 .3 .2 .1]);
 
hndlList=[quitterhandle infohandle lancerhandle Menuhandle Mlistehandle];
  passPrmt.handle=hndlList
  passPrmt.clmap=[];
  passPrmt.imgfile=imglist;
   figNumber=gcf;
   set(figNumber,'Visible','off', ...
      'UserData',passPrmt);
   watchoff(oldFigNumber);
   figure(figNumber);
 
im2=imread('Logo32.JPG');
axes('position',[.27 .54 .4 .41]);
imshow(im2);
 
  elseif strcmp(action,'Selec'),
   begin;
 
 
   figNumber=gcf;
   passPrmt=get(figNumber, 'UserData');
   hndlList=passPrmt.handle;
   imglist=passPrmt.imgfile;
   popupHndl=hndlList(5)
 
   ClpopupHndl=hndlList(4);
   n=get(popupHndl, 'Value')
   set(ClpopupHndl, 'Value', 1);
   [t1 t2]=size(tab2);
   filename=tab2(n,1:t2);
   pos=findstr(filename,' ');
   [t3 t4]=size(pos);
      if (t4>0) filename=filename(1:pos(1,1)-1);end;
   filename
   lecture;
 
   imshow(im);
   image=im;
 
   axes('position',[.01 .090 .74 .6]);
     axes('position',[.01 .050 .74 .8]);
 imshow(im);
 
 
 
 
   elseif strcmp(action,'lancer'),
   figNumber=gcf;
   passPrmt=get(figNumber, 'UserData');
   hndlList=passPrmt.handle;
   VpopupHndl=hndlList(4);
 
   begin;
   VpopupHndl=hndlList(5);
   n2=get(VpopupHndl, 'Value')
   [t1 t2]=size(tab2);
   filename=tab2(n2,1:t2)
   pos=findstr(filename,' ')
   [t3 t4]=size(pos);
   if (t4>0) filename=filename(1:pos(1,1)-1);end;
 
   image=filename;
   nom=main(image);
 
froot = './ImageDroite';
list = dir(sprintf('%s\\*.jpg', froot));
fns = sprintf('%s\\%s', froot, nom);
fprintf(fns);
im3= imread(fns);
axes('position',[.315 .08 .3 .4]);
imshow(im3)
 
 
end
L'image im3 c'est t'elle voulu afficher dans la position axes('position',[.315 .08 .3 .4]); mais rien est afficher ?? ya-il quelqu'un qui peut m'aider à corriger le code ??