why \pi don't work??

1 次查看(过去 30 天)
vincent balintongog
vincent balintongog2021-10-20
评论: Stephen ,2021-10-20
why i dont get the symbol of pi?
  1 个评论
Stephen
Stephen 2021-10-20
"why i dont get the symbol of pi?"
Why do you expect that entering a TeX command in the MATLAB command prompt should return a "symbol of pi" ?
Did MATLAB turn into a TeX compiler overnight?

请先登录,再进行评论。

回答(1 个)

Rik
Rik 2021-10-20
Why did you expect it to? This isn't LaTeX.
If you want the pi symbol in a character vector that is possible:
char(960)
ans = 'π'
Or you can use a text object, which allows you to use LaTeX syntax:
text(0.5,0.5,'\pi')

标签

Community Treasure Hunt

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

Start Hunting!

Translated by