I am trying to get a function that is the opposite of diff()
I want to add the values of adjacent columns in a matrix for each column in the matrix.
I do NOT need the sum of the entire column or row.
For example:

If I had:

[ 1 2 4;
3 5 8 ]

I would end up with:

[ 3 6;
8 13 ]

Of course for just one or two columns this is simple as I can just do x[,1]+x[,2], but these matrices are quite large.