How to use the power operator in xlabel?
665 views (last 30 days)
Show older comments
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

0 Comments
Accepted Answer
sixwwwwww
on 7 Dec 2013
use xlabel as below:
xlabel('A*R^(2/3) (m^(8/3))', 'Interpreter', 'none')
6 Comments
Hamdullah Livaoglu
on 8 Feb 2017
it doesnt' work in num2str?! like; text(double(tx),double(ty),['Q=',cfe1,'*x^',{cfe2}],'FontSize',12)
More Answers (3)
IEESHAN SHARMA
on 19 Nov 2017
Use title('Mean squared error xrec(t)-x(t)^{2}'). Make sure you use curly braces.
0 Comments
See Also
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!