How can I put a greek letter into an input sentence
5 views (last 30 days)
Show older comments
So I need to set a variable, delta, by making it an input so I have
delta= input('\delta=');
but the text that is printed for the input is not the greek letter. I was wondering how I could make it so that it displays the symbol \delta opposed to the word. I've looked around on the internet and could honestly not find how to do it/ interpret responses to similar problems and translate them over (I'm a bit of a novice)
Many thanks :)
0 Comments
Answers (1)
Marc Jakobi
on 7 Oct 2016
input(char(948))
(look up ASCII tables for other letters).
1 Comment
Walter Roberson
on 9 Oct 2016
This will work for some people, but people who are using a non-unicode font for the command window, and people using MS Windows with a Windows code page set to something that does not have that character (type typical Windows Code Page 1252 does not have it) might not be able to display the character in that way. Also, sufficiently old versions of MATLAB code not handle it.
If the version of MATLAB is sufficiently old (before about R2006b), then upgrading might be the solution.
When the font is a problem, the cure is to change the font in the Preferences.
When the active region is a problem, switching regions in the system preferences might fix the problem (but things don't always work out that well...)
See Also
Categories
Find more on Labels and Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!