Matlab sum every n columns. You can change this by specifying a second argument to sum.