Filter löschen
Filter löschen

How to automatcly save a plot in matlab

1 Ansicht (letzte 30 Tage)
khatereh
khatereh am 3 Dez. 2011
I have a loop that do plotting. Is there a way instead of manually saving the graph the plots automatically be saved?

Akzeptierte Antwort

Grzegorz Knor
Grzegorz Knor am 3 Dez. 2011
Simple example:
x = linspace(0,1,100);
for k=1:10
stem(x,x/k)
ylim([0 1])
filename = sprintf('pic%i',k);
print('-djpeg', filename, '-r100');
end

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots 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!

Translated by