Change name of a graph inside loop automatically.
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have a loop from one to ten. for each loop I got graph. My question is can I change the name of graph automatically?
For example. first graph will have name (Result for experiment number 1)
second graph will have name (Result for experiment number 2),
and so on for all ten graphs
Regards
댓글 수: 0
답변 (1개)
Stalin Samuel
2015년 11월 24일
for i=1:10
figure(i)
title(sprintf('Result for experiment number %d',i))
end
댓글 수: 1
Stephen23
2015년 11월 24일
Note that it is recommended to avoid the variable names i and j, as these are both names of the inbuilt imaginary unit.
참고 항목
카테고리
Help Center 및 File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!