Effacer les filtres
Effacer les filtres

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

11 vues (au cours des 30 derniers jours)
dayu
dayu le 22 Mar 2019
Commenté : madhan ravi le 22 Mar 2019
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.

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (1)

KSSV
KSSV le 22 Mar 2019

Catégories

En savoir plus sur Labels and Annotations dans Help Center et File Exchange

Produits


Version

R14SP2

Community Treasure Hunt

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

Start Hunting!

Translated by