Removing automatic variable names in array2table or writetable and adding some text to the header of output file
显示 更早的评论
Hi, I am trying to get a text output file using the following code:
Output=[DD,D];
T=array2table(Output);
writetable(T,'m.txt','Delimiter',' ')
I get the variable names Output1 and Output2 as headers in the output text file. I would like to remove both names and instead have a text like DR as the heading.
5 个评论
Ive J
2021-10-17
Try this
T=array2table(Output, 'VariableNames', {'DR1', 'DR2'}); % or whatever variable names you like to set
Mohammad R. Ghassemi
2021-10-17
dpb
2021-10-17
Then don't use a table with two variables but an array instead.
T=table([DD,D],'VariableNames',{'DR'});
Mohammad R. Ghassemi
2021-10-17
Mohammad R. Ghassemi
2021-10-17
回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!