Matlab write string on new line
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Haziq Razali
am 12 Dez. 2018
Beantwortet: Guillaume
am 12 Dez. 2018
How can I split a long string of text into multiple lines in Matlab ? For example,
fprintf(fileID,'%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n',..
I want to to split the
%s
so I can comment what each item means but I still want them to be in the same line in the output. But the ... do not work within strings.
fprintf(fileID,'%s,... % ID
%s,... % frame
%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n',..
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Guillaume
am 12 Dez. 2018
fprintf(fileID, ['%s,' ... ID
'%s,' ... frame
'%s,' ...
'%s\n'], ...
...
);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Entering Commands 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!