the superscript in the textbox in the figure?
이전 댓글 표시
How can I put (degree) the degree of temperature Celsius in the text box inside the figure? ex: C to the power (Celsius)
댓글 수: 1
Fei Wang
2017년 6월 25일
1. Right click, then Select latex mode 2. input $^{\circ}$C 3. done
채택된 답변
추가 답변 (5개)
Star Strider
2014년 3월 24일
편집: Star Strider
2014년 3월 24일
It’s very well hidden in the documentation. In the online documentation it’s under String. That reveals:
\circ º
The rest of the special TeX characters are there as well.
Salaheddin Hosseinzadeh
2014년 3월 24일
편집: Salaheddin Hosseinzadeh
2014년 3월 24일
As I remember MATLAB understand a little bit of Latex! lol
If you've ever worked with Latex which is just like writing in a linear form try this
legend('C^{Celcious}') or title or xlable or ...
or
title('C^o')
if you want to have Celsius sign
Let me know about the results plz.
Good Luck!
댓글 수: 2
Mary Jon
2014년 3월 24일
Salaheddin Hosseinzadeh
2014년 3월 26일
You can apply the same format to text, legend, disp, display, labelx labely title and similar functions that accept strings generally
Salaheddin Hosseinzadeh
2014년 3월 24일
If you have a variable then you can concatenate the string simply
x=30;
title([num2str(x),'^c']) or legend or text or xlable or ...
Be lazy and go with the easy one! lol
Good Luck!
Salaheddin Hosseinzadeh
2014년 3월 26일
I don't know what version of MATLAB you are using! But the following code resulted as such on my PC with 2012a and it's really easy to use this notation! You can see the image as well!
figure
text(0.1,0.1,'Hello^{World}')
text(.3,.3,'trying_{subscript}')
text(.6,.6,'trying_{subscript}^{power}')

댓글 수: 3
Salaheddin Hosseinzadeh
2014년 3월 26일
I hope the pics would be clear, it ws the first time I posted pics! I thought one can click to see the full size image!
Mary Jon
2014년 3월 26일
Image Analyst
2014년 3월 26일
You CAN click on the image to bring it up full size. At least using Firefox you can.
Salaheddin Hosseinzadeh
2014년 3월 26일
Another instance when you have numbers to deal with!
>> x=30
x =
30
>> figure
>> text(.1,.1,[num2str(x),'^c'])
>>

카테고리
도움말 센터 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!