plot label with latex symbol

조회 수: 74 (최근 30일)
Simo
Simo 2020년 4월 3일
답변: Lazaros 2025년 4월 22일
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')

채택된 답변

Peng Li
Peng Li 2020년 4월 3일
You need to have the leading and ending symbol $.
e.g., ylabel('$J_{1}(\rho)$','interpreter','latex')
  댓글 수: 1
Simo
Simo 2020년 4월 3일
it works
thanks

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Lazaros
Lazaros 2025년 4월 22일
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

카테고리

Help CenterFile Exchange에서 Labels and Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by