How to separate plot titles on single line? [solved]
Mostrar comentarios más antiguos
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]);
Respuesta aceptada
Más respuestas (2)
Alan Stevens
el 4 de Jul. de 2021
0 votos
Define the titles with an extra space at the end of each word.
Les Beckham
el 4 de Jul. de 2021
0 votos
Try this:
title(sprintf('%s %s %s %s %s %s', head, neck, helmet, impact, energy, rep);
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!