Suppose I have a matrix a:
a = [2,3;1,2;1,2;0,1;1,2;3,1;1,3;2,1;2,3;3,1];
I want to build matrix b with dimension 2*2 that first row is sum up of all odd rows of matrix a and second rwo is sum up of all even rows of matrix a
b = [16;19]
arraymatrixmatrix manipulation
a = [2,3;1,2;1,2;0,1;1,2;3,1;1,3;2,1;2,3;3,1];
b = [16;19]
Best Answer