How can we add different lines in msgbox with different lengths?
9 次查看(过去 30 天)
显示 更早的评论
How can we add different lines in msgbox with different lengths? We cant use () these brackets neither brackets used in cell array so what is the option?
0 个评论
采纳的回答
Image Analyst
2014-12-13
Use sprintf and \n. For example:
message = sprintf('This is line 1.\nThe date is %s', date)
msgbox(message);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!