I have a bunch of automatically-generated CSV files with headers, which I'd like to import into Matlab as a table. I used code such as
T = readtable('d:\test.csv', 'readvariablenames', true);
However, even though the name of the CSV's first column is runNr, the first column in the Matlab table gets named "x___runNr"
This clearly has something to do with the CSV files being in a slightly format different from that expected by Matlab. For instance, if I manually change the name of that first cell in Excel to something else, then reopen the CSV, the cell contents are all merged into a cell, on every row.
Still, I am not sure what to do to fix this, since I cannot change the format of the CSVs.
Any help?
1 Comment
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/486616-first-colum-of-csv-imported-table-has-x___-added-to-its-name#comment_758712
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/486616-first-colum-of-csv-imported-table-has-x___-added-to-its-name#comment_758712
Sign in to comment.