Effacer les filtres
Effacer les filtres

how to saveas 20 figure as picture with different names ?

3 vues (au cours des 30 derniers jours)
arian hoseini
arian hoseini le 3 Déc 2022
Commenté : arian hoseini le 3 Déc 2022
X=rand(1000);
c=1;
d=1;
for i=1:50:1000
for c=1:50+c
H(i)=X(c);
end
c=c+50;
D(d)=figure(d)
plot(H);
d=d+1
end

Réponse acceptée

Muu
Muu le 3 Déc 2022
Use 'saveas(gcf, ['figure' num2str(d) '.png'])'
For example:
X=rand(1000);
c=1;
d=1;
for i=1:50:1000
for c=1:50+c
H(i)=X(c);
end
c=c+50;
D(d)=figure(d)
plot(H);
saveas(gcf, ['figure' num2str(d) '.png'])
d=d+1
end

Plus de réponses (0)

Catégories

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

Produits


Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by