How to separate plot titles on single line? [solved]
조회 수: 8 (최근 30일)
이전 댓글 표시
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
채택된 답변
추가 답변 (2개)
Les Beckham
2021년 7월 4일
Try this:
title(sprintf('%s %s %s %s %s %s', head, neck, helmet, impact, energy, rep);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!