Dear all,
Given a matrix A=MxM, I would like to construct a new matrix B=MxN, where each column of B is the sum of selected columns of A. The selection is given by a vector V of integer that determines the columns to be summed.
For example, if A is 128x128 and I have a vector V of 128 integers filled with number between 0 and 9, B should be 128x10 where the column i of B is equal to the sum of the columns of A where V[x]=i and x is the index of all columns to be summed.
Thanks,
David