Concatenate string with table
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Wictor Oliveira
am 5 Jun. 2023
Kommentiert: Wictor Oliveira
am 5 Jun. 2023
I want to save a txt file containing a header (string format with various information) followed by the data in columns (table format). OBS: The column names does not have to appear.
Ex:
>> header
header =
"BEGIN
START = 0.0
END
"
>> class(header)
ans =
'string'
>> tab_data
tab_data = 380004 x 7 table
0 Kommentare
Akzeptierte Antwort
Matt J
am 5 Jun. 2023
writematrix(header,'filename.txt');
writetable(tab_data,'filename.txt',WriteVariableNames=false,WriteMode='append');
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings 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!