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

5 visualizzazioni (ultimi 30 giorni)
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 Commenti
dpb
dpb il 2 Dic 2015
I don't think you can create data that doesn't exist here; if the recorded frequency is 15-min, the three 5-minute values for each fifteen minute interval would have to sum to that value. You could arbitrarily divide by three I suppose or use some other weight but it'd all be just pure guess-work and of little value in the end I'd think.
Sounds like the best plan would be to sum over the three consecutive five-minute intervals for those days' data to make them consistent with those already integrated/collected on that time span.
If the data are complete, then it's pretty easy to simply reshape by 3,[], sum and shape back to do the accumulation.
dpb
dpb il 2 Dic 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.

Accedi per commentare.

Risposte (1)

Ingrid
Ingrid il 2 Dic 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

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by