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

 채택된 답변

Matt J
Matt J 2023년 6월 5일

0 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

제품

릴리스

R2020b

태그

질문:

2023년 6월 5일

댓글:

2023년 6월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by