How to put hat over a greek symbol express its value in legend of a plot?

조회 수: 29 (최근 30일)
I want to write expressions like alpha_0 cap(or hat)=0, alpha_0 cap(or hat)=1 and so on in legend of a plot.
Need to display aplha, with subsscript zero, with a hat, equate to a numerical value.
Kindly help me.

채택된 답변

madhan ravi
madhan ravi 2019년 3월 22일
legend(sprintf('$\\hat{\\alpha}(0) = %d$',2),'Interpreter','latex')
% ^----- numeric value
  댓글 수: 6
madhan ravi
madhan ravi 2019년 3월 22일
Maybe it’s because of version: Try:
z= ['$\hat{\alpha}(0) =',num2str(2)','$'];
legend(z,'Interpreter','latex')
madhan ravi
madhan ravi 2019년 3월 22일
If you mean subscript: Then use ^{0} - above or _{0} - below instead of (0)

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

추가 답변 (1개)

KSSV
KSSV 2019년 3월 22일

카테고리

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

제품


릴리스

R14SP2

Community Treasure Hunt

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

Start Hunting!

Translated by