How to automatcly save a plot in matlab

10 ビュー (過去 30 日間)
khatereh
khatereh 2011 年 12 月 3 日
I have a loop that do plotting. Is there a way instead of manually saving the graph the plots automatically be saved?

採用された回答

Grzegorz Knor
Grzegorz Knor 2011 年 12 月 3 日
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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by