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]);

 채택된 답변

VBBV
VBBV 2021년 7월 4일
%if true
plot(rand(10));
title('[head neck helmet impact energy rep]');

추가 답변 (2개)

Alan Stevens
Alan Stevens 2021년 7월 4일

0 개 추천

Define the titles with an extra space at the end of each word.
Les Beckham
Les Beckham 2021년 7월 4일

0 개 추천

Try this:
title(sprintf('%s %s %s %s %s %s', head, neck, helmet, impact, energy, rep);

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

질문:

2021년 7월 4일

편집:

2021년 7월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by