Put title for each subplot

14 ビュー (過去 30 日間)
Ting-Yu Chueh
Ting-Yu Chueh 2019 年 9 月 18 日
コメント済み: Star Strider 2019 年 9 月 19 日
Dear all,
I want to put a subtitle for each subplt. I tried to do, but it didn't work out.
The code is below, Could anyone help me to fix the code? Thanks!
Titileindex=["Group effect" "Condition effect" "Group by Condition"];
Titileindex=["Group effect" "Condition effect" "Group by Condition"];
figure;
for i= 1:3
subplot(3,1,i);
title ('Titleindex(i)');
end

採用された回答

Star Strider
Star Strider 2019 年 9 月 18 日
Remove the single quotes:
title (Titleindex(i));
and spell the name correctly in both the variable and references to it!
  2 件のコメント
Ting-Yu Chueh
Ting-Yu Chueh 2019 年 9 月 19 日
Thanks~
Star Strider
Star Strider 2019 年 9 月 19 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by