How do I name figures in for loops.
조회 수: 33 (최근 30일)
이전 댓글 표시
My for loop is i=1:10 in which 10 plots wre produced at 10 different locations. I would like to name the figures as 'location i' where i is 1,2,3,...10 but without having to name each figure individually. Is there a function to do this?
댓글 수: 0
답변 (1개)
Walter Roberson
2020년 11월 28일
for i = 1 : 2
fig(i) = figure('name', sprintf('location %d', i));
end
fig(1).Name
fig(2).Name
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!