How can I save the outputted string (retaining tabs/added lines) to a .txt file?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Keith Grey
am 14 Mai 2020
Kommentiert: Keith Grey
am 14 Mai 2020
How can I save the outputted string (retaining tabs/added lines) to a .txt file?
MESSAGE = sprintf('Var1 is %g.\nVar2 is %g.', X, Y);
disp(MESSAGE)
In the Command Window, disp(MESSAGE) outputs:
X is 2.24.
Y is 3.33.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Search Path finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!