How to automatcly save a plot in matlab

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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by