How to avoid unwanted line break in figure title?
55 ビュー (過去 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!