How to use latex ($\ell}$) in matlab figure ?

조회 수: 18 (최근 30일)
zhuang joe
zhuang joe 2018년 10월 16일
편집: Walter Roberson 2021년 11월 13일
I want to use a latex form '$\ell}$' in MATLAB figure, but it seems that MATLAB figure doesn't support this command? How to type this command in MATLAB figure?

답변 (1개)

Walter Roberson
Walter Roberson 2018년 10월 16일
h = text(0.5,0.5,'$\ell_{2,1}$', 'interpreter', 'latex')
Your posting has an unmatched } that would cause problems.
  댓글 수: 5
Walter Roberson
Walter Roberson 2018년 10월 16일
h = legend('$\ell_{2,1}$');
h.Interpreter = 'latex';
Anil Kumar
Anil Kumar 2021년 11월 11일
편집: Walter Roberson 2021년 11월 13일
How to write it for a color axis?
c = colorbar;
set(c,'FontSize',32);
%set(c,'FontSize',32,'Interpreter','latex');%didn't work
c.Label.String = '$E^{\ell}_{n(3)}$';
c.label.String.Interpreter='latex' % didn't work
caxis([min(x(:,14)) max(x(:,14))]);
am I missing something here? Thanks
Edit:
c.Label.Interpreter = 'latex';
found here

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

카테고리

Help CenterFile Exchange에서 Title에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by