setappdata, where to verify?
    3 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
I'm slowly progressing on my way to Matlab "nirvana"... 
How would I go about checking whether an element has indeed been added to a figure object? Suppose I use this code in my script :
set(FigureH, 'Position', [1800 500 f_Largeur f_Hauteur]);   
ax1 = gca;
setappdata(FigureH,'axImage', ax1);
breakpoint  = 1;
Suppose I set a breakpoint right after setappdata and navigate to the Command Window and type :
>> Get(FigureH)
... to get all FigureH properties, I don't see the appdata I just created, that are supposed to be stored in the figure, according to the documentation? I was expecting, possibly, to see it in UserData[ ]?
0 Kommentare
Akzeptierte Antwort
  Voss
      
      
 am 17 Feb. 2022
        Use 
getappdata(FigureH)
to view/verify the application data associated with FigureH via setappdata().
2 Kommentare
  Voss
      
      
 am 17 Feb. 2022
				It is there, in a property called 'ApplicationData', which doesn't show up by default when you do get(FigureH).
f = figure();
setappdata(f,'test_app_data',1);
get(f) % no ApplicationData property listed
get(f,'ApplicationData') % but here it is, including 'test_app_data'
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Legend finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

