필터 지우기
필터 지우기

Change name of a graph inside loop automatically.

조회 수: 2 (최근 30일)
Ali Kareem
Ali Kareem 2015년 11월 24일
댓글: Stephen23 2015년 11월 24일
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일
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.

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

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by