Hi everyone, I have 2 matrices A and B
A =[1; 2; 1; 3; 4; 5; 6;];B = [40.5511; 40.5511; 34.6732; 34.6731; 32.1111; 32.1111; 32.1111;]
I want to create C by summing up the values in A if they have the same corresponding value in B.
C = [3 40.5511; 1 34.6732; 3 34.6731; 15 32.1111;];
Best Answer