How to automatcly save a plot in matlab

조회 수: 6 (최근 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개)

카테고리

Help CenterFile 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