How can we add different lines in msgbox with different lengths?

9 Ansichten (letzte 30 Tage)
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?

Akzeptierte Antwort

Image Analyst
Image Analyst am 13 Dez. 2014
Use sprintf and \n. For example:
message = sprintf('This is line 1.\nThe date is %s', date)
msgbox(message);

Weitere Antworten (0)

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by