How to separate plot titles on single line? [solved]
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ludovico Riello
el 4 de Jul. de 2021
Editada: Ludovico Riello
el 6 de Jul. de 2021
figure()
plot (time,BrACOM)
%xlim ([tmin tmax])
xlabel('Time [s]');
ylabel('Acc [g]');
legend('x','y','z');
title([head neck helmet impact energy rep]);
I would like the variables to be spaced on the plot title, like:head neck helmet impact energy rep and not headneckhelmetimpactenergyrep
Solution:
title([head ' ' neck ' ' helmet ' ' impact ' ' energy]);
0 comentarios
Respuesta aceptada
VBBV
el 4 de Jul. de 2021
%if true
plot(rand(10));
title('[head neck helmet impact energy rep]');
0 comentarios
Más respuestas (2)
Alan Stevens
el 4 de Jul. de 2021
Define the titles with an extra space at the end of each word.
0 comentarios
Les Beckham
el 4 de Jul. de 2021
Try this:
title(sprintf('%s %s %s %s %s %s', head, neck, helmet, impact, energy, rep);
0 comentarios
Ver también
Categorías
Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!