Ältere Kommentare anzeigen
HOw to display the length of message given which is given as input in the message box?
1 Kommentar
Jan
am 30 Apr. 2012
What is "the message box"? What means "input" here? Which "length" do you want: The number of characters or the width when displayed on the screen considering the font and line wrapping?
Akzeptierte Antwort
Weitere Antworten (1)
Vino
am 4 Mai 2012
0 Stimmen
1 Kommentar
Titus Edelhofer
am 4 Mai 2012
yes, you can: use e.g. num2str to convert to a string, e.g.
msgbox(['The answer is ' num2str(42) '.'])
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!