MATLAB Answers

IISc geetha

superscript and subscript for figure 'name'

Asked by IISc geetha
on 27 Nov 2012

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...



No products are associated with this question.

3 Answers

Answer by Jan Simon
on 27 Nov 2012

There is no LaTeX interpreter for the figure name.

But depending on the used font, you can use Unicode characters for ^{2}^and ^{3}:

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().


Answer by IISc geetha
on 27 Nov 2012


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


Jan Simon
on 27 Nov 2012

Of course you can use the Unicode characters "SHM^{2}". Then the title of the figure will be "SHM^{2}". But the title bar does not allow to use LaTeX formatting. And there is no other method, except you want to modify the renderer of the operating system.

What do you want to know about the "figure('name', 'The name')"? I suggest to type this in the command line, such that you can see what happens immediately.

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
on 27 Nov 2012

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.

Answer by Thierry Dalon
on 19 Sep 2013
Edited by Thierry Dalon
on 19 Sep 2013

Copy/paste the upperscript character:



Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!