raise power to power in title

51 Ansichten (letzte 30 Tage)
Nora Al Allaf
Nora Al Allaf am 15 Okt. 2020
Kommentiert: Star Strider am 15 Okt. 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? :\

Akzeptierte Antwort

Star Strider
Star Strider am 15 Okt. 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 Kommentar
Star Strider
Star Strider am 15 Okt. 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)
.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by