Effacer les filtres
Effacer les filtres

raise power to power in title

34 vues (au cours des 30 derniers jours)
Nora Al Allaf
Nora Al Allaf le 15 Oct 2020
Commenté : Star Strider le 15 Oct 2020
Hi~
I wanna write a title to a graph this way >> y = x * e^(- x^2 / 2 )
title(' y = x*e^(- x^2 / 2) ') writes e as base and only ( as exponent
title(' y = x*e^-^x^2^/^2 ') shows e^(-x2/2) not as e^(-x^2/2)
any idea how to solve this? :\

Réponse acceptée

Star Strider
Star Strider le 15 Oct 2020
Try this (using LaTeX):
figure
plot(rand(50,1), rand(50,1), 'p')
axis([0 1 0 1])
title('$y = x \times e^{- \frac{x^2}{2}}$', 'Interpreter','latex', 'FontSize',16)
prodcing:
.
  1 commentaire
Star Strider
Star Strider le 15 Oct 2020
Write it the way I wrote it to use the LaTeX interpreter that MATLAB has. (I worte it entirely in MATLAB.)
If you want to write it in TeX instead (also suported by MATLAB):
title('y = x \times e^{- {x^2}/{2}}', 'FontSize',16)
.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Programming 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