Can't add a Greek letter into sprinf
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hasan Ghorbani
el 17 de Abr. de 2016
Comentada: Nick
el 17 de Ag. de 2021
Hi,
I am having problem with adding \angle character into my sprintf command. The result is for command window only.
Here is the line I need to add the character to:
out = arrayfun(@(x, y) sprintf('%f \angle %7.4f°', x, y), absA, phaseA, 'uni', 0);
0 comentarios
Respuesta aceptada
Walter Roberson
el 17 de Abr. de 2016
Angle is not a greek character.
You are trying to use tex with command window output. That will not work. Unicode might work if you are using an appropriate font.
anglechar = char(8736);
out = arrayfun(@(x, y) sprintf('%f %s %7.4f°', anglechar, x, y), absA, phaseA, 'uni', 0);
5 comentarios
Nick
el 17 de Ag. de 2021
Yes thank you. Been having that problem for awhile and couldn't figure it out
Más respuestas (0)
Ver también
Categorías
Más información sobre Labels and Annotations 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!