MATLAB: How to create another matrix with the sum of every 30 rows in a 14,400 by 11 matrix

reshapesum

I have a matrix with 11 columns of daily data for 40 years (14,400 days) and need the sum of every 30 days to be calculated. After looking around a lot I decided I'd ask on here. Thanks in advance for the help!

Best Answer

out = squeeze(sum(reshape(yourdata',11,30,[]),2))';