How do I change the header name of csv files?
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Here are the screenshots of my code and the ouput too
4 commentaires
Réponse acceptée
Adam Danz
le 14 Avr 2020
Modifié(e) : Adam Danz
le 15 Avr 2020
When you write the csv file, there are no headers using the syntax you shared. The Var1 Var2.... headers appear when you read the data back into Matlab.
T = array2table([p(:),d(:),e(:)], 'VariableNames', {'p','d','e'})
% Replace these with meaningful variable names ^^^^^^^^^^^^^
writetable(T, 'speed.csv')
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Tables dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!