readtable function error in matlab version r2020a
显示 更早的评论
#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 个评论
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
2021-6-9
Zaidan Adenin Said
2021-6-9
Star Strider
2021-6-9
My pleasure!
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!