MATLAB: Datastore multiple delimiter (space, tab)

datastoredelimiterMATLAB

Hello,
I have the following data on my 1st column, MM/dd/YYYY HH:mm:ss.SSSSS. How do I seperate the two?
When using
ds=datastore('data.txt');
it'll group MM/dd/YYYY HH:mm:ss.SSSSS into Var1.
Var1
___________________________
'MM/dd/YYYY HH:mm:ss.SSSSS'
I tried
ds=datastore('data.txt',...
'Delimiter',{' ','/t'});
it'll seperate MM/dd/YYYY to Var1 and all colums after that as Var2.
Var1 Var2
___________ ____________________________________
'MM/dd/YYYY' 'HH:mm:ss.SSSSS DATA DATA DATA ...'

Best Answer

I should have spotted that straightaway, the way to specify control characters is with a backslash \, not a forward slash /.
ds=datastore('data.txt', 'Delimiter',{' ','\t'}); %\t not /t
will load your file fine. You may need to override the datetime format detected by datastore depending on whether your dates are encoded as 'MM/dd/uuuu' or 'dd/MM/uuuu'