Hi,
I want to add this xlabel to my figure: xlabel = ('A*R^(2/3) (m^(8/3))'). What my matlab does is instead of displaying the '^-sign' it places the first symbol after the operator in superscript, see figure attached. How can I overcome this problem (by either displaying the '^-sign' or by placing the entire term in superscript)?
Thanks, Marijn

 採用された回答

sixwwwwww
sixwwwwww 2013 年 12 月 7 日

3 投票

use xlabel as below:
xlabel('A*R^(2/3) (m^(8/3))', 'Interpreter', 'none')

9 件のコメント

Marijn
Marijn 2013 年 12 月 7 日
Thanks!
sixwwwwww
sixwwwwww 2013 年 12 月 7 日
you are welcome
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 12 月 8 日
編集済み: Azzi Abdelmalek 2013 年 12 月 8 日
Sixwwwwww, have you checked if this work?
sixwwwwww
sixwwwwww 2013 年 12 月 8 日
Yes it is working because user want to show exactly A*R^(2/3) (m^(8/3)) in the label instead of showing powers in super scripts. So that's why I used property 'Interpreter', 'none' so that MATLAB can't use its default property 'Interpreter', 'tex' to change the output display
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 12 月 8 日
Ok, it's also possible to do it:
xlabel('A*R\^(2/3) (m\^(8/3))')
Hamdullah Livaoglu
Hamdullah Livaoglu 2017 年 2 月 8 日
it doesnt' work in num2str?! like; text(double(tx),double(ty),['Q=',cfe1,'*x^',{cfe2}],'FontSize',12)
SHUBHAM CHANDRAKANT
SHUBHAM CHANDRAKANT 2023 年 11 月 21 日
my laptop does not have symbol (^) then how should i use it ?
Walter Roberson
Walter Roberson 2023 年 11 月 21 日
Could you post a picture of what your keyboard looks like? What is the typical region that uses that kind of keyboard?
SHUBHAM CHANDRAKANT
SHUBHAM CHANDRAKANT 2023 年 11 月 22 日
Silly me,after looking at every key properly i found (^), it was on the upper number row of keyboard.
BTW, Thank you for your response.

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

その他の回答 (3 件)

G A
G A 2013 年 12 月 7 日

5 投票

xlabel('A*R^{2/3}m^{8/3}')

5 件のコメント

Marijn
Marijn 2013 年 12 月 7 日
Thanks!
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 12 月 8 日
This is not working
G A
G A 2013 年 12 月 8 日
編集済み: G A 2013 年 12 月 8 日
In my system (R2013b win64) this is working - I checked before answering. This is for: "...or by placing the entire term in superscript"
Mohamed Alhamri
Mohamed Alhamri 2019 年 10 月 30 日
it works fine in R2016a win64
Rashid Shams
Rashid Shams 2021 年 6 月 23 日
It works fine in R2020a X64 too. thanks

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

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 12 月 7 日

3 投票

xlabel('A*R^2^/^3^ m^8^/^3')
IEESHAN SHARMA
IEESHAN SHARMA 2017 年 11 月 19 日

2 投票

Use title('Mean squared error xrec(t)-x(t)^{2}'). Make sure you use curly braces.

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by