readtable function error in matlab version r2020a
Show older comments
#sorry if my english is bad
like i stated in the question. the readtable() function is error when i want to load .csv data.
this is strange because this morning i use it and is working fine. but when i using it this night is declare an error like this
>> csvData = readtable('asterix_cat48_2T1Searah1Berlawanan_ver2.csv')
Error using readtable (line 198)
Reference to non-existent field 'text'.
then i look up in the https://www.mathworks.com/help/matlab/ref/readtable.html#mw_19d8ece8-5151-47f4-8ff2-8e0fa633db25 for reference. and i look that there is a solution. the new line program that i use is like this
csvData = readtable('asterix_cat48_2T1Searah1Berlawanan_ver2.csv','Format','auto');
Error using readtable (line 198)
Reference to non-existent field 'text'.
Note: readtable detected the following parameters:
'Delimiter', ',', 'HeaderLines', , 'ReadVariableNames', true
but it make new error like that program said.
if you want to test it, you can download it in attachment that i give it.
i need help. thank you very much
4 Comments
Be sure to install the latest update to R2020a in your installation. It may be necessary to use 'PreserveVariableNames',1, or the name-value pair I use here. (I do not remember when that changed.)
In R2021a, it runs without error:
csvData = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/645870/asterix_cat48_2T1Searah1Berlawanan_ver3.csv', 'VariableNamingRule','preserve')
Consider using readcell (introduced in R2019a) to read the file, then convert it to a table with cell2table.
.
Zaidan Adenin Said
on 9 Jun 2021
Zaidan Adenin Said
on 9 Jun 2021
Star Strider
on 9 Jun 2021
My pleasure!
Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects 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!