Change name of a graph inside loop automatically.

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

답변 (1개)

Stalin Samuel
Stalin Samuel 2015년 11월 24일

0 개 추천

for i=1:10
figure(i)
title(sprintf('Result for experiment number %d',i))
end

댓글 수: 1

Stephen23
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.

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

카테고리

도움말 센터File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

질문:

2015년 11월 24일

댓글:

2015년 11월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by