|
"Pekka Kumpulainen" <pekka.nospam.kumpulainen@tut.please.fi> wrote in message <h0t8lm$2dg$1@fred.mathworks.com>...
> "Andrey Kazak" <AK@nospam.ru> wrote in message <h0t7lq$t1i$1@fred.mathworks.com>...
> > Greetings!
> >
> > I have a csv file as follows:
> > ===
> > Date and Time, Value,
> > 08.06.2009 16:16:26, 3
> > ...
> > ===
> > Could you advice me please on how to import such time series in matlab for further processing, such as time interpolation please?
> >
> > Prompt and clear reply would be very much appreciated...
>
> doc textscan
> doc datenum
>
> This for example seems to work:
> fid = fopen('myfile.csv');
> g = textscan(fid,'%s%f','headerlines',1,'delimiter',',');
> fclose(fid);
> time = datenum(g{1});
Oops, wasn't carefun enough with the date format, this should do it
time = datenum(g{1},'dd.mm.yyyy HH:MM:SS');
or if you use month.day.year, swap the dd and mm in the format string
hth
|