Figure not appearing with gcf - is visible
Afficher commentaires plus anciens
When I use the anovan function as per the example below a figure is created. I want to edit the name of this figure (by adding a suffix). If I then try to get the name of the figure (as per last line of code below), a new figure is created as if there are no figures in the workspace. I've looked through the figure properties and the figure is visible. Is there something I am missing?
y = [52.7 57.5 45.9 44.5 53.0 57.0 45.9 44.0]';
g1 = [1 2 1 2 1 2 1 2];
g2 = {'hi';'hi';'lo';'lo';'hi';'hi';'lo';'lo'};
g3 = {'may';'may';'may';'may';'june';'june';'june';'june'};
[p,t,stats] = anovan(y,{g1,g2,g3})
get(gcf,'Name') %does not work (creates new figure)
If I try a different function such as multcompare it now works.
multcompare(stats) %needs the stats variable created by anovan
get(gcf,'Name') %this works
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!