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

 Réponse acceptée

Matt J
Matt J le 5 Juin 2023

0 votes

writematrix(header,'filename.txt');
writetable(tab_data,'filename.txt',WriteVariableNames=false,WriteMode='append');

Plus de réponses (0)

Catégories

En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange

Produits

Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by