Can't add a Greek letter into sprinf
15 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Walter Roberson
2016 年 4 月 17 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Labels and Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!