Filter löschen
Filter löschen

Cumulative sum of rainfall

1 Ansicht (letzte 30 Tage)
Saleem Sarwar
Saleem Sarwar am 30 Sep. 2015
Bearbeitet: Andrei Bobrov am 30 Sep. 2015
I require cumulative sum of rainfall of 5 days and so. For first 4 days, rainfall will be same as observed on that day, rainfall of 5th day will be sum of first 5 days rainfall, 6th day rainfall will be 2 to 6 day rainfall and son on. Please suggest script for that kind of computation. I have daily rainfall from 1950 to 2013.

Antworten (1)

Andrei Bobrov
Andrei Bobrov am 30 Sep. 2015
Bearbeitet: Andrei Bobrov am 30 Sep. 2015
Use function of MATLAB - conv2:
R = randi(45,20,1); % Let R - your data of rainfall
out = conv2(R(:),ones(5,1)/5,'same');

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by