How to save a figure (subplot) through each run of a for loop
조회 수: 2 (최근 30일)
이전 댓글 표시
I have loop (for i=1:10) and for each loop I have subplot consists from 15 figs (for each page). How can I save 10 pages of subplot?
Thanks
Riyadh
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2016년 4월 26일
Use the command "figure" to create a new figure
댓글 수: 2
Azzi Abdelmalek
2016년 4월 26일
Look at this example
t=0:0.1:10;
for k=1:3
y=rand(size(t))
figure
h=plot(t,y)
hgsave(h,sprintf('fig%d',k))
end
Now use hgload to get your figures
close all % close your current figures
hgload('fig1')
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!