I have a large daily rainfall data and require to create a new series with rainfall of 1, 2 , 3 and 4 day will be same as observed, then day 5 rainfall will be sum of 1, 2,3, 4 and 5 day rainfall. 6 day rainfall will be sum of rainfall of 2, 3, 4, 5 and 6 day rainfall. Repeat this function for 50 years daily rainfall data. Could any body suggest me matlab script for this kind of analysis? data file will be like this
date rainfall Cumulative rainfall1/1/1950 10 101/2/1950 0 01/3/1950 0 01/4/1950 0 01/5/1950 15 251/6/1950 5 201/7/1950 10 351/8/1950 7 42.........
Best Answer