superscript and subscript for figure 'name'

7 次查看(过去 30 天)
Dear All, Can somebody tell me how to write alphanumeric superscript and subscript in figure property 'name'.
i want to write abc^{2} and abc_{1}
I have tried figure('name','abc^{2}abc_{1});
But ^,{,},_ appears in the screen instead of superscript and subscript...
can somebody help...
thanks in advance...
  2 个评论
Jan
Jan 2017-6-29
@srinivas: Please open a new thread for a new question. Then mention, where the text should appear. It matters if it is the figure title, a uicontrol or a text object.

请先登录,再进行评论。

回答(3 个)

Jan
Jan 2012-11-27
There is no LaTeX interpreter for the figure name.
But depending on the used font, you can use Unicode characters for ^{2}^and ^{3}:
e²
This is "U+00B2" and can be reached on a Windows keyboard by Alt+0178. But I do not know a method for _{1} and if the users changes the screen font, you might get strange characters. Therefore I would avoid special characters in the name of the figure, which appears in the winfow border. It is much better to write such detailed information in the figure's content, e.g. using title() or text().

IISc geetha
IISc geetha 2012-11-27
hello,
Is there any other method...
how to write SHM^{2} using unicode characters... can you please also tell me the command figure('name',????)....
pls help
  3 个评论
IISc geetha
IISc geetha 2012-11-27
Sir, what is the exact command that I should write so that i can see SHM^2 as the name.(I want to see SHM superscript 2)...
i tried writing figure('name','U+00B2').....It displays U+00B2...This didnt work...Am i missing any command or...
I tried using figure('name','SHM^2','font','arial')...but this doesn't work pls Help me
Matt Fig
Matt Fig 2012-11-27
IISc, what is confusing here? Jan has told you twice that there is no command to write so that you can get what you want.

请先登录,再进行评论。


Thierry Dalon
Thierry Dalon 2013-9-19
编辑:Thierry Dalon 2013-9-19
Copy/paste the upperscript character:
figure('Name','SHM²');

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by