hi
how can i enter latex symbol (greek letter rho this time) in the labels of a plot? (first order bessel function)
yl={'J_{1}(\rho)','$'};
xl={'\rho','$'};
ylabel(yl,'interpreter','latex')
ylabel(xl,'interpreter','latex')

 Réponse acceptée

Peng Li
Peng Li le 3 Avr 2020

1 vote

You need to have the leading and ending symbol $.
e.g., ylabel('$J_{1}(\rho)$','interpreter','latex')

Plus de réponses (1)

Lazaros
Lazaros le 22 Avr 2025

0 votes

Matlab basically understands all the basic symbols that the amsmath package uses, so you can include subscript and superscript, as well as functions like \cos and \frac{}{}. The comment above covers you, but I have some additional examples in this video, https://www.youtube.com/watch?v=5TwChCWGllI

Catégories

En savoir plus sur Labels and Annotations dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by