How do you print special character(s) using sprintf? I want to use this or similar to add special characters to an axis label as in the following:
Here the degree sign doesn't print:
ylabel(sprintf('T at %.0f \circF',Temp))

 採用された回答

Walter Roberson
Walter Roberson 2022 年 12 月 6 日

0 投票

Temp = -19.6
Temp = -19.6000
ylabel(sprintf('T at %.0f \\circF',Temp), 'Interpreter', 'tex')

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Characters and Strings についてさらに検索

製品

リリース

R2021b

質問済み:

2022 年 12 月 6 日

回答済み:

2022 年 12 月 6 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by