Headings for graphs generated in a loop

4 ビュー (過去 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 Center および File ExchangeTitle についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by