필터 지우기
필터 지우기

Save Figures to One Folder

조회 수: 45 (최근 30일)
Amanda
Amanda 2013년 4월 23일
댓글: Tanziha Mahjabin 2020년 2월 17일
I want to save multiple figures to the same folder, with the name of figure_1, figure_2, etc.
Here is the code: x = 1:5;
y = [1,1,1,1,1]
z = [2,2,2,2,2]
a = [3,3,3,3,3]
b = [4,4,4,4,4]
c = [5,5,5,5,5]
figure;
plot(x,y)
figure;
plot(x,z)
figure;
plot(x,a)
figure;
plot(x,b)
figure;
plot(x,c)

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 4월 23일
figure;
h(1)=plot(x,y)
figure;
h(2)=plot(x,z)
figure;
h(3)=plot(x,a)
figure;
h(4)=plot(x,b)
figure;
h(5)=plot(x,c)
for k=1:5
saveas(h(k),sprintf('figure_%d.jpg',k))
end
  댓글 수: 3
Mohammad Bhat
Mohammad Bhat 2018년 2월 23일
Undefined function or variable 'export_fig'. Matlab 2016

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

venkata reddy kopparthi
venkata reddy kopparthi 2018년 7월 12일
편집: venkata reddy kopparthi 2018년 7월 12일
  • we can save current open figure by saveas library
  • saveas(gcf,'<path>\figure_name.jpg');
  댓글 수: 1
Tanziha Mahjabin
Tanziha Mahjabin 2020년 2월 17일
Hi,
i have already saved figures in a folder. how can i make a gif in matlab combining all of them?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by