Average hourly usgs data

1 Ansicht (letzte 30 Tage)
Sergio
Sergio am 1 Sep. 2013
HI,
I have a 15-minute dataset that I want to average hourly. The dataset contains 15 minute flow measurement from a USGS gage. There are some data missing so the time step is not consistent.
Thank you and happy labor day weekend!
SDH
  2 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 1 Sep. 2013
This is not clear
Sergio
Sergio am 1 Sep. 2013
Hi Azzi,
I have a precipitation dataset from the USGS at a predominantly 15-minute interval. There are some gaps in the dataset. Like for example I have data for 1:15, 1:30 but then instead of 1:45 it would skip that to 2:00 and follow with 2:15. This happens a couple of times. How can I average the 15-minute dataset to a 60-minute dataset?
Hope this is clear enough.
SDH

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 1 Sep. 2013
Bearbeitet: Azzi Abdelmalek am 1 Sep. 2013
You can do interpolation with interp1 function
  2 Kommentare
Sergio
Sergio am 1 Sep. 2013
thank you Azzi, I'm working on using Accumarray and if that does not work I'll try interp1.
Azzi Abdelmalek
Azzi Abdelmalek am 1 Sep. 2013
%Example
%Example
t={'08:00' '08:15' '08:45' '09:15' '10:00'}
y=[10 20 30 40 50]
%-----------------------------------------------------------
ti=cellstr(datestr(datenum(0,0,0,8,(0:15:120),0),'HH:MM'))'
x=find(ismember(ti,t))
xi=1:numel(ti)
yi=interp1(x,y,xi)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by