How do I change the header name of csv files?
    8 views (last 30 days)
  
       Show older comments
    
Here are the screenshots of my code and the ouput too
4 Comments
Accepted Answer
  Adam Danz
    
      
 on 14 Apr 2020
        
      Edited: Adam Danz
    
      
 on 15 Apr 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')
More Answers (0)
See Also
Categories
				Find more on Text Files in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!