Accumulate previous values in time serie
2 次查看(过去 30 天)
显示 更早的评论
I have a rain time series like this:
[year month day hour min rain]
2008 1 12 9 0 0
2008 1 12 10 0 0
2008 1 12 11 0 0
2008 1 12 12 0 0.2
2008 1 12 13 0 0.2
2008 1 12 14 0 1
2008 1 12 15 0 1.6
2008 1 12 16 0 2.2
2008 1 12 17 0 1.6
2008 1 12 18 0 0.8
2008 1 12 19 0 1.6
2008 1 12 20 0 0.8
2008 1 12 21 0 0.6
2008 1 12 22 0 0.6
2008 1 12 23 0 0.8
And I need to calculate rain accumulated on past 3, 6, 12, 24 and 48 hours, so, for example, for a 3-hour accumulate, the last line should sum 2 previous lines, resulting in
2008 1 12 23 0 2.0
How can I program this on MatLab?
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!