How to add a dot above y in legend

89 次查看(过去 30 天)
Hi,
I want to write the first and second derivative with the legend command like this y' y''
This is what I tried:
legend ('y'(0)', 'y''(0)')
but the ' and '' after y interferes with the command.
I tried to search around for answers but found nothing I understood so this is my last resort!
And thanks in advance for the help.

采纳的回答

Walter Roberson
Walter Roberson 2020-5-11
legend({'$\dot{y}(0)$', '$\ddot{y}(0)$'}, 'Interpreter', 'latex')
  1 个评论
Kevin Tran
Kevin Tran 2020-5-11
Thank you so much, this really saved me so much time and helped me alot!

请先登录,再进行评论。

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by