I have timeseries with 15 minute time stepp. How can I screen one hour times series (cumulative) from 15 minues time series.

16 views (last 30 days)
07/01/2012 00:00 0.00
07/01/2012 00:15 0.00
07/01/2012 00:30 0.00
07/01/2012 00:45 0.00
07/01/2012 01:00 0.00
07/01/2012 01:15 0.00
07/01/2012 01:30 0.00
07/01/2012 01:45 0.00
07/01/2012 02:00 0.00
07/01/2012 02:15 0.00
07/01/2012 02:30 0.00
07/01/2012 02:45 0.00
07/01/2012 03:00 0.00
07/01/2012 03:15 0.00
07/01/2012 03:30 0.00
07/01/2012 03:45 0.00
07/01/2012 04:00 0.00
07/01/2012 04:15 0.00
07/01/2012 04:30 0.00
07/01/2012 04:45 0.00
07/01/2012 05:00 0.00
07/01/2012 05:15 0.00
07/01/2012 05:30 0.00
  4 Comments
dpb
dpb on 2 Dec 2015
"I tried to use linear interpolation to generate 5 minute time step..."
That, indeed, doesn't work well; use the datetime or datenum methods instead over whatever number of N-minute time periods needed and let them do the internal rounding and rollover to actual dates. You start at any arbitrary date, of course, but unless the time periods are simply arbitrary intervals unless you do it this way you inevitably run into issues in comparing to calendar data owing to days/month, leap years, etc., etc., etc., ...
As per usual, w/o an actual data file or two with which to 'spearmint it's more difficult to write actual code than give general advice for a specific application.

Sign in to comment.

Answers (1)

Ingrid
Ingrid on 2 Dec 2015
since you stated that the time step is not fixed you cannot use reshape but you should use a combination of histc and accummarray
  1 Comment
dpb
dpb on 2 Dec 2015
I'd build the full time array and populate as data exist, then do the agglomeration on that to get around that issue...

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by