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 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')
csvData = 59×52 table
010_SAC 010_SIC 140_ToD 020_TYP 020_SIM 020_RDP 020_SPI 020_RAB 020_FX 040_RHO 040_THETA 090_V 090_G 090_FL 130_SRLP 130_SRRP 130_SAMP 130_PRLP 130_PAMP 130_RPDP 130_APDP 130_FX 130_PAM 240_TId 161_Tn 042_X 042_Y 200_CGS 200_CHdg 170_CNF 170_RAD 170_DOU 170_MAH 170_CDM 170_FX 170_TRE 170_GHO 170_SUP 170_TCC 110_3D_Height 120_CAL 120_RDS 120_FX 120_D 230_COM 230_STAT 230_SI 230_ModeSSSC 230_ARC 230_AIC 230_BDS16 230_BDS37 _______ _______ ___________________ _______ _______ _______ _______ _______ ______ _________________ _________________________ _____ _____ ____________ ________ ________ ________ ________ ________ ________ ________ ______ _____________ _______ ______ _________________ ________________ ___________________ _________________________ _______ _______ _______ _______ _______ ______ _______ _______ _______ _______ _____________ ____________ _______ ______ _____ _______ ________ ______ ____________ _______ _______ _________ _________ 0 1 {'46232.9296875 s'} 1 0 0 0 0 0 {'1.77734375 NM'} {'356.2701416015625 deg'} 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-35.0 dBm'} {'J2'} 2 {'-0.1015625 NM'} {'1.7734375 NM'} {'194.23828125 kt'} {'260.4473876953125 deg'} 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'-9 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46233.0234375 s'} 1 0 0 0 0 0 {'1.203125 NM' } {'12.72216796875 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-35.0 dBm'} {'J1'} 1 {'0.2578125 NM' } {'1.171875 NM' } {'194.23828125 kt'} {'96.2567138671875 deg' } 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'11 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46234.9140625 s'} 1 0 0 0 0 0 {'1.76953125 NM'} {'353.089599609375 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-37.0 dBm'} {'J2'} 2 {'-0.203125 NM' } {'1.7578125 NM'} {'194.23828125 kt'} {'257.354736328125 deg' } 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'-9 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46235.0625 s' } 1 0 0 0 0 0 {'1.21484375 NM'} {'18.3966064453125 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-36.0 dBm'} {'J1'} 1 {'0.3828125 NM' } {'1.1484375 NM'} {'194.23828125 kt'} {'102.0904541015625 deg'} 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'11 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46236.890625 s' } 1 0 0 0 0 0 {'1.7578125 NM' } {'349.43115234375 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-45.0 dBm'} {'J2'} 2 {'-0.3125 NM' } {'1.7265625 NM'} {'194.23828125 kt'} {'253.828125 deg' } 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'-9 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46237.1015625 s'} 1 0 0 0 0 0 {'1.22265625 NM'} {'24.0216064453125 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-36.0 dBm'} {'J1'} 1 {'0.4921875 NM' } {'1.1171875 NM'} {'194.23828125 kt'} {'107.9241943359375 deg'} 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'11 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46238.875 s' } 1 0 0 0 0 0 {'1.75 NM' } {'345.7452392578125 deg'} 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-47.0 dBm'} {'J2'} 2 {'-0.421875 NM' } {'1.6953125 NM'} {'194.23828125 kt'} {'250.301513671875 deg' } 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'-8 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46239.109375 s' } 1 0 0 0 0 0 {'1.234375 NM' } {'29.5806884765625 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-39.0 dBm'} {'J1'} 1 {'0.609375 NM' } {'1.0703125 NM'} {'194.23828125 kt'} {'113.7579345703125 deg'} 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'10 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46240.8515625 s'} 0 0 0 0 0 0 {0×0 char } {0×0 char } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'0.0 dBm' } {'J2'} 2 {'-0.5234375 NM'} {'1.65625 NM' } {'194.23828125 kt'} {'246.7694091796875 deg'} 0 3 0 0 0 0 1 0 0 1 {'3275.0 ft'} {'-8 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46241.15625 s' } 1 0 0 0 0 0 {'1.2421875 NM' } {'35.0958251953125 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-36.0 dBm'} {'J1'} 1 {'0.7109375 NM' } {'1.015625 NM' } {'194.23828125 kt'} {'119.6026611328125 deg'} 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'10 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46243.1875 s' } 1 0 0 0 0 0 {'1.25390625 NM'} {'41.2261962890625 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-37.0 dBm'} {'J1'} 1 {'0.8203125 NM' } {'0.9375 NM' } {'194.23828125 kt'} {'126.1505126953125 deg'} 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'9 m/sec' } 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46244.8125 s' } 1 0 0 0 0 0 {'1.72265625 NM'} {'334.5556640625 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-39.0 dBm'} {'J2'} 2 {'-0.7265625 NM'} {'1.5546875 NM'} {'194.23828125 kt'} {'239.710693359375 deg' } 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'-7 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46245.234375 s' } 1 0 0 0 0 0 {'1.26171875 NM'} {'46.64794921875 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-35.0 dBm'} {'J1'} 1 {'0.9140625 NM' } {'0.8671875 NM'} {'194.23828125 kt'} {'131.9952392578125 deg'} 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'8 m/sec' } 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46246.7890625 s'} 1 0 0 0 0 0 {'1.71484375 NM'} {'330.7763671875 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-41.0 dBm'} {'J2'} 2 {'-0.828125 NM' } {'1.4921875 NM'} {'194.23828125 kt'} {'236.1785888671875 deg'} 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'-7 m/sec'} 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46247.2421875 s'} 1 0 0 0 0 0 {'1.26953125 NM'} {'52.020263671875 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-47.0 dBm'} {'J1'} 1 {'1.0 NM' } {'0.78125 NM' } {'194.23828125 kt'} {'137.823486328125 deg' } 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'7 m/sec' } 0 0 1 0 0 0 0 0 1 0 0 0 1 {'46248.7734375 s'} 1 0 0 0 0 0 {'1.70703125 NM'} {'326.986083984375 deg' } 0 0 {'32.75 FL'} 0 0 0 0 1 0 0 0 {'-42.0 dBm'} {'J2'} 2 {'-0.921875 NM' } {'1.4296875 NM'} {'194.23828125 kt'} {'232.6519775390625 deg'} 0 1 0 0 0 0 0 0 0 1 {'3275.0 ft'} {'-7 m/sec'} 0 0 1 0 0 0 0 0 1 0 0
Consider using readcell (introduced in R2019a) to read the file, then convert it to a table with cell2table.
.
ok thanks for the answer, and sorry for my late response. so this is absurd, i dont know its my fault or what. when i try again with the same program this morning
csvData = readtable('asterix_cat48_2T1Searah1Berlawanan_ver2.csv')
its working fine. i dont know why i get the error before. im not changing the file nor change the program, but now i think i will use the same program that i use before.
but thank you very much for the answer. if got the error again, i will try the solution that you gave.

Sign in to comment.

Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Products

Release

R2020a

Asked:

on 8 Jun 2021

Commented:

on 9 Jun 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!