How to avoid unwanted line break in figure title?
27 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Martin Laurenzis
el 25 de En. de 2021
Editada: Atikul Haque
el 4 de Jul. de 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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/499123/image.png)
0 comentarios
Respuesta aceptada
Walter Roberson
el 25 de En. de 2021
t = [nameSources{1} ' ' valParameter{1} '%'];
or
t = nameSources(1) + ' ' + valParameter(1) + '%';
5 comentarios
Atikul Haque
el 4 de Jul. de 2023
Editada: Atikul Haque
el 4 de Jul. de 2023
Thank you @Walter Roberson, it has worked for me lastly. But didn't need those extra quote marks outside the 3rd bracket.
Más respuestas (0)
Ver también
Categorías
Más información sobre Title en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!