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
| function test
figure('units','pixels',...
'position',[100 200 300 200]);
u=uicontrol('style','text');
selection
set(u,'string',getappdata(0,'choix'));
function selection
fig=figure('units','pixels',...
'position',[400 200 350 200]);
uicontrol('position',[50 50 50 50],...
'string','A',...
'callback','setappdata(0,''choix'',''A'')');
uicontrol('position',[150 50 50 50],...
'string','B',...
'callback','setappdata(0,''choix'',''B'')');
uicontrol('position',[250 50 50 50],...
'string','Close',...
'callback','close(gcf)');
waitfor(fig) |
Partager