Effacer les filtres
Effacer les filtres

How to save GUI figure

1 vue (au cours des 30 derniers jours)
Jas Gil
Jas Gil le 16 Mai 2012
Hi, I am trying to save GUI Figure in a loop with different name every time when a fresh set of data passed which is ploted on the GUI charts, so that I will have Gui figure for each set of data.
Thanks.

Réponse acceptée

Daniel
Daniel le 16 Mai 2012
The function "saveas" may do what you need. Also, "eval" and "sprintf" could be useful for including variables in the figure name. An example would be:
A = randn(10,100);
for i=1:10
figure
plot(1:100,A(i,:))
eval(sprintf('saveas(gcf, ''figure_%d'', ''fig'')',i));
end
This creates a set of 10 figures with the name of each figure determined by the value of the variable "i". Hope that gets you started!

Plus de réponses (0)

Catégories

En savoir plus sur Printing and Saving dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by