![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/382313/image.png)
raise power to power in title
34 ビュー (過去 30 日間)
古いコメントを表示
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? :\
0 件のコメント
採用された回答
Star Strider
2020 年 10 月 15 日
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/382313/image.png)
.
1 件のコメント
Star Strider
2020 年 10 月 15 日
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)
.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!