Why does input() display this string improperly?
Mostra commenti meno recenti
I'm curious about displaying unusual characters via the char() command and how these strings behave when passed to input().
For example, this string displays the Greek character Omega at the command line, but the same string passed through input() does not. Is this a limitation of input() or some bug resulting from locale settings?
>> str = ['Value ' char(937) ' ? ']
str =
Value Ω ?
>> input(str)
Value ?
Currently running R2015b.
Risposta accettata
Più risposte (1)
Matthew Eicholtz
il 5 Ott 2016
I could not reproduce your error, but I am using R2016a, so maybe that is the reason.
As an alternative, try:
str = sprintf('Value %s ?',char(937));
input(str);
Does that produce the desired result?
1 Commento
Nicholas
il 5 Ott 2016
Categorie
Scopri di più su Labels and Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!