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?

采纳的回答

Image Analyst
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 个)

类别

Help CenterFile Exchange 中查找有关 Dialog Boxes 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by