I've a CSV file with following data:
20180101 170000;1.200370;1.201000;1.200370;1.201000;0
20180101 170100;1.200830;1.200950;1.200170;1.200300;0
20180101 170200;1.200350;1.200430;1.200350;1.200430;0
20180101 170300;1.200410;1.200500;1.200310;1.200460;0
20180101 170400;1.200490;1.200490;1.200460;1.200480;0
20180101 170500;1.200500;1.200500;1.200480;1.200480;0
20180101 170600;1.200500;1.200690;1.200320;1.200480;0
20180101 170700;1.200480;1.200540;1.200270;1.200500;0
20180101 170800;1.200510;1.200870;1.200470;1.200870;0
20180101 170900;1.200820;1.200970;1.200760;1.200940;0
20180101 171000;1.200940;1.200950;1.200760;1.200770;0
20180101 171100;1.200840;1.200880;1.200840;1.200880;0
20180101 171200;1.200880;1.200880;1.200790;1.200790;0
20180101 171300;1.200800;1.200800;1.200800;1.200800;0
20180101 171400;1.200770;1.200930;1.200770;1.200930;0
20180101 171500;1.200920;1.201050;1.200360;1.200360;0
20180101 171600;1.200380;1.200380;1.200380;1.200380;0
20180101 171700;1.200390;1.200390;1.200380;1.200380;0
20180101 171800;1.200420;1.200450;1.200400;1.200450;0
20180101 171900;1.200410;1.200500;1.200410;1.200500;0
20180101 172000;1.200530;1.200530;1.200440;1.200450;0
20180101 172200;1.200450;1.200450;1.200450;1.200450;0
20180101 172300;1.200450;1.200550;1.200450;1.200550;0
The first column is a date in the form YYYYMMDD HHmmss.
I want to import the csv file in matlab with the readmatrix command. What I obtain is
data = readmatrix("\Data.csv");
>> data(1:20,:)
ans =
NaN 1.2004 1.2010 1.2004 1.2010 0
NaN 1.2008 1.2009 1.2002 1.2003 0
NaN 1.2004 1.2004 1.2004 1.2004 0
NaN 1.2004 1.2005 1.2003 1.2005 0
NaN 1.2005 1.2005 1.2005 1.2005 0
NaN 1.2005 1.2005 1.2005 1.2005 0
NaN 1.2005 1.2007 1.2003 1.2005 0
NaN 1.2005 1.2005 1.2003 1.2005 0
NaN 1.2005 1.2009 1.2005 1.2009 0
NaN 1.2008 1.2010 1.2008 1.2009 0
NaN 1.2009 1.2009 1.2008 1.2008 0
NaN 1.2008 1.2009 1.2008 1.2009 0
NaN 1.2009 1.2009 1.2008 1.2008 0
NaN 1.2008 1.2008 1.2008 1.2008 0
NaN 1.2008 1.2009 1.2008 1.2009 0
NaN 1.2009 1.2010 1.2004 1.2004 0
NaN 1.2004 1.2004 1.2004 1.2004 0
NaN 1.2004 1.2004 1.2004 1.2004 0
NaN 1.2004 1.2005 1.2004 1.2005 0
NaN 1.2004 1.2005 1.2004 1.2005 0
The date is not imported correctly.
Since the file is pretty big, and since I'd like to do not modify it (it's in a public repository, and I should create a local copy, and the file is not only big, but I've plenty of them), is there a way to use readmatrix in order to read correctly also the datetime column?
In case is not possible, what should I do in order to modify the file (I'll create a local copy) in a way that can be imported by readmatrix?
