how to resolve superscript for text fields

I am trying to create superscripts. eg
ss = "³⁵";
ss1 = '³⁵';
If i execute these on the command line or using f9 it provides the result ³⁵
However when I run this as part of a function I get the result ³?

3 件のコメント

Rik
Rik 2020 年 2 月 25 日
Time for a unicode lookup.
My speculation is that your file encoding doesn't directly support this. What happens if you use char(8309) instead? (the superscript 3 is char(179), so that should work with many more encodings)
Darren Akehurst
Darren Akehurst 2020 年 2 月 25 日
That works really well. Thankyou.
Additionally is it possible to create alphabetic superscripts eg N T
Incidently where did you get the code 8309 from?
Walter Roberson
Walter Roberson 2020 年 2 月 25 日
You mention text fields, but what kind of text fieds? What can be done with text() to draw characters on a plot, is different from what you can put in a uicontrol style text with difficulty, and different again from what you can do in a uitable. What you can do with uitable style text without difficulty is the same as what you can do at the command line without difficulty; with difficulty you can do some additional weird things at the command line. Then there is what you can do in a uitext field in app designer...

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDevelop Apps Using App Designer についてさらに検索

質問済み:

2020 年 2 月 25 日

コメント済み:

2020 年 2 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by