MATLAB: Remove quotes in last column of the table

MATLABquotesreadtable

Hi,
Atm, I'm reading a big dataset in ML by:
DATA = readtable('data_log_gyro.csv');
Example below
Now I want the third column also in numerical values (so one column split into three columns) instead of in between quotes, I reached out to
opts = detectImportOptions('data_log_gyro.csv');
I tried changing the 'Variable type' to double, but then it's output is NaN
varTypes = {'categorical','datetime','double'};
opts = setvartype(opts,varTypes);
But was unable to find the correct options for this. Anyone who has a clue?

Best Answer

You can use the Format option in readtable with a format of
"%{yyyy-MM-dd}D %{dd-MMM-yyyy}D %{hh:mm}T ('%f', '%f', '%f')"
Note that I used double-quotes for the format, so that I would not have to escape the ' characters which are to appear literally.
There are other approaches, using the detected import options and modifying the Prefix and Suffix properties.