Can't add a Greek letter into sprinf
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hasan Ghorbani
le 17 Avr 2016
Commenté : Nick
le 17 Août 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 commentaires
Réponse acceptée
Walter Roberson
le 17 Avr 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Labels and Annotations 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!