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
|
%Utilisation du tag
decor = axes('Parent',fh,'Position',...
[.24 0.305 .72 .548],'hitTest'='off','tag','decor');
%Risque : c'est à toi d'être sûr que le tag est unique
%et dans l'autre prog :
handleDecor = findobj(handleFigure,'Type','axes','Tag','decor')
%%%%%%%%%%%%
%Utilisation de la propriété UserData de la figure
decor = axes('Parent',fh,'Position',[.24 0.305 .72 .548],'hitTest'='off');
set(gcf,'UserData',decor);
%puis :
handleAxesDecor = get(gcf,'UserData');
%%%%%%%%%%%%
%Utilisation de set/getappdata
decor = axes('Parent',fh,'Position',[.24 0.305 .72 .548],'hitTest'='off');
setappdata(0,'decor',decor);
%puis :
handleAxesDecor = getappdata(0,'decor');
%%%%%%%%%%%%
%Utilisation du guidata (si tu as créé ta figure avec GUIDE)
decor = axes('Parent',fh,'Position',[.24 0.305 .72 .548],'hitTest'='off');
handles.decor = decor;
guidata(hObject, handles);%normalement hObject est défini dans tous
%tes callback
%et ensuite :
handleAxesDecor = handles.decor; |
Partager