How to avoid unwanted line break in figure title?
55 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Martin Laurenzis
le 25 Jan 2021
Modifié(e) : Atikul Haque
le 4 Juil 2023
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 commentaires
Réponse acceptée
Walter Roberson
le 25 Jan 2021
t = [nameSources{1} ' ' valParameter{1} '%'];
or
t = nameSources(1) + ' ' + valParameter(1) + '%';
5 commentaires
Atikul Haque
le 4 Juil 2023
Modifié(e) : Atikul Haque
le 4 Juil 2023
Thank you @Walter Roberson, it has worked for me lastly. But didn't need those extra quote marks outside the 3rd bracket.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Title dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!