How to display latex expression with natural log in a plot's legend?

6 次查看(过去 30 天)
I'm having trouble getting the following LaTex expression to display in the legend. I used those expresions in the Live Editor's Insert Latex Equation and they were accepted so I'm not sure why I'm getting the warning.
LatexInLegend.jpg

采纳的回答

Star Strider
Star Strider 2019-7-6
You have to begin and end each part of the expression with dollar-signs ($).
So:
'$e^\frac{ln(k)}{k}(t-k)$'
and so for the rest.
  2 个评论
Star Strider
Star Strider 2019-7-6
As always, my pleasure.
The ‘$’ are a LaTeX convention for specifying the maths expressions. See: The Not So Short Introduction to LaTeX2e for an extended discussion. (If I remember correctly, the section on maths begins about page 56.)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Legend 的更多信息

标签

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by