Removing automatic variable names in array2table or writetable and adding some text to the header of output file
Afficher commentaires plus anciens
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 commentaires
Ive J
le 17 Oct 2021
Try this
T=array2table(Output, 'VariableNames', {'DR1', 'DR2'}); % or whatever variable names you like to set
Mohammad R. Ghassemi
le 17 Oct 2021
dpb
le 17 Oct 2021
Then don't use a table with two variables but an array instead.
T=table([DD,D],'VariableNames',{'DR'});
Mohammad R. Ghassemi
le 17 Oct 2021
Mohammad R. Ghassemi
le 17 Oct 2021
Réponses (1)
Catégories
En savoir plus sur Text Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!