MATLAB: Dot indexing is not supported for variables of this type.

datadot indexingimportdata

I am trying to import a text file (that I have attached) and when I run the code, I get the dot indexing error. I have similar files that I am able to import and I have run a size on each file and the attached file has a size of 1 11 while the other files have size of 4560 11. When using the command line and the uiopen to see the files, they both open inside matlab but when using the following code I get the dot indexing error.
Any advice on why this file returns an error is greatly appreciated.
SLC4PickupMoto1066L=importdata('SLC_Test4_Pickup_Moto_1066L.txt');
SLC4PickupMoto1066L=SLC4PickupMoto1066L.data;

Best Answer

I suspect that the other files do not start with a numeric line before the column headers.
I recommend switching to readtable(). If you are using R2019b or earlier, I would recommend calling detectImportOptions; in R2020a that started being called automatically.