How to automatcly save a plot in matlab

2 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by