How to use the power operator in xlabel?

304 vues (au cours des 30 derniers jours)
Marijn
Marijn le 7 Déc 2013
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

Réponse acceptée

sixwwwwww
sixwwwwww le 7 Déc 2013
use xlabel as below:
xlabel('A*R^(2/3) (m^(8/3))', 'Interpreter', 'none')
  9 commentaires
Walter Roberson
Walter Roberson le 21 Nov 2023
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 le 22 Nov 2023
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.

Connectez-vous pour commenter.

Plus de réponses (3)

G A
G A le 7 Déc 2013
xlabel('A*R^{2/3}m^{8/3}')
  5 commentaires
Mohamed Alhamri
Mohamed Alhamri le 30 Oct 2019
it works fine in R2016a win64
Rashid Shams
Rashid Shams le 23 Juin 2021
It works fine in R2020a X64 too. thanks

Connectez-vous pour commenter.


Azzi Abdelmalek
Azzi Abdelmalek le 7 Déc 2013
xlabel('A*R^2^/^3^ m^8^/^3')

IEESHAN SHARMA
IEESHAN SHARMA le 19 Nov 2017
Use title('Mean squared error xrec(t)-x(t)^{2}'). Make sure you use curly braces.

Catégories

En savoir plus sur Entering Commands dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by