MATLAB prints ''Greek letters'' in chart text, but how about sprintf, compose, string or char functions?

120 vues (au cours des 30 derniers jours)
How can I define greek letters, inside one of these functions ? (sprintf, compose, string or char)

Réponse acceptée

Abhishek Tiwari
Abhishek Tiwari le 1 Juil 2022
Modifié(e) : Abhishek Tiwari le 1 Juil 2022
Hi,
There are lots of pre defined greek letters. You just need to pick right index and use sprintf(). I have listed them below :
sprintf('%c ', 945:969)
ans = 'α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω '
  2 commentaires
Star Strider
Star Strider le 1 Juil 2022
Capital letters:
sprintf('%c ', (945:969)-32)
ans = 'Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ ΢ Σ Τ Υ Φ Χ Ψ Ω '
.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by