Effacer les filtres
Effacer les filtres

How to add a dot above y in legend

89 vues (au cours des 30 derniers jours)
Kevin Tran
Kevin Tran le 11 Mai 2020
Commenté : Kevin Tran le 11 Mai 2020
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.

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by