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!