필터 지우기
필터 지우기

Headings for graphs generated in a loop

조회 수: 1 (최근 30일)
Tom
Tom 2013년 1월 28일
Hello,
Can anyone tell me how to go about having separate headings for graphs (and histograms) generated in a loop?
Thanks.

채택된 답변

Thorsten
Thorsten 2013년 1월 28일
myheadings = {'first title' 'seccond title' 'yet another title' 'and so one'};
for i = 1:4
plot(rand(1,10))
title(myheadings{i})
pause(1)
end
  댓글 수: 4
Thorsten
Thorsten 2013년 1월 28일
Make sure to use curly braces
myheadings{i}
and that i is the index variable in your loop. Try the example.
Tom
Tom 2013년 1월 28일
Yep. My brackets weren't curly enough. Thanks again.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Title에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by