the function of \n
482 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Umut Oskay
am 30 Mär. 2020
Kommentiert: Umut Oskay
am 30 Mär. 2020
what is the function of \n ?
0 Kommentare
Akzeptierte Antwort
Birdman
am 30 Mär. 2020
newline
For instance:
chr = 'Whose woods these are I think I know.';
chr = [chr newline 'His house is in the village though']
chr =
['Whose woods these are I think I know...'
'His house is in the village though']
2 Kommentare
John D'Errico
am 30 Mär. 2020
Bearbeitet: John D'Errico
am 30 Mär. 2020
To add...
>> newline
ans =
'
'
Note the vertically displaced quotes as displayed in the command window.
Weitere Antworten (1)
Image Analyst
am 30 Mär. 2020
When used in a format specifier string, it puts the following stuff on a new line:
>> fprintf('Line 1\nLine 2\nLine 3\n\nLine 4\n')
Line 1
Line 2
Line 3
Line 4
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!