This is an overview of the problem I am having:
Example matrix:
[100 101 32.5; 200 205 50.0; 201 201 0.47; 100 101 60.0; 200 205 25.0]
My actual matrix is thousands of rows long.
And I want to be able to find all rows with common entries in column 1 & 2 AND add corresponding values in column three together. i.e I want something like(adding row 1 & 4 since they have common elements on column 1 & 2; similarly row 2 &5):
[100 101 92.5; 200 205 75.0]
And I want to create a new matrix for any rows with same values on first two columns:
[201 201 0.47]
My data will have a mixture of these two row types.
Thank you
Best Answer