Put title for each subplot

15 visualizaciones (últimos 30 días)
Ting-Yu Chueh
Ting-Yu Chueh el 18 de Sept. de 2019
Comentada: Star Strider el 19 de Sept. de 2019
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

Respuesta aceptada

Star Strider
Star Strider el 18 de Sept. de 2019
Remove the single quotes:
title (Titleindex(i));
and spell the name correctly in both the variable and references to it!
  2 comentarios
Ting-Yu Chueh
Ting-Yu Chueh el 19 de Sept. de 2019
Thanks~
Star Strider
Star Strider el 19 de Sept. de 2019
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by