message length
古いコメントを表示
HOw to display the length of message given which is given as input in the message box?
1 件のコメント
Jan
2012 年 4 月 30 日
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?
採用された回答
その他の回答 (1 件)
Vino
2012 年 5 月 4 日
0 投票
1 件のコメント
Titus Edelhofer
2012 年 5 月 4 日
yes, you can: use e.g. num2str to convert to a string, e.g.
msgbox(['The answer is ' num2str(42) '.'])
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!