If I have:
T(:,:,1) =
1 2 3 4 5 6 7 8 9
T(:,:,2) =
1 4 7 2 5 8 3 6 9
I want to convert each matrix to be vector contains [(the sum of 1st row) (the sum of 2nd row) (the sum of 3rd row)] for example: Convert T(;,:,1) to be [6 15 24] where: 6 = 1+2+3 , 15 = 4+5+6 , 24 = 7+8+9 The same, Convert T(:,:,2) to be [12 15 18] where: 12 = 1+4+7 , 15 = 2+5+8 , 18 = 3+6+9 .. What's the function that can do it?
Best Answer