How to avoid unwanted line break in figure title?
50 次查看(过去 30 天)
显示 更早的评论
H all,
I am plotting data for diffenet parameter, where the different parameter are given as string arrays.
nameSources = ["source1", "source2"];
valParameter = ["value1", "value2"];
Each time I write the title, an unwanted line break is introduced.
figure(1)
t = [nameSources(1) ' ' valParameter(1) '%'];
title(t)
Can anybody help?
0 个评论
采纳的回答
Walter Roberson
2021-1-25
t = [nameSources{1} ' ' valParameter{1} '%'];
or
t = nameSources(1) + ' ' + valParameter(1) + '%';
5 个评论
Atikul Haque
2023-7-4
编辑:Atikul Haque
2023-7-4
Thank you @Walter Roberson, it has worked for me lastly. But didn't need those extra quote marks outside the 3rd bracket.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Title 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!