Hi everyone, I have 2 matrices, A and B. As you can see, everyrow in A is for a particular row in B. What I want to to do is for a repetitive, I want to remove them and take the highest value in A. For example, 3 to 10 appears twice (3 4 5 7 8 10 & 3 4 5 6 9 8 10 with corresponding A values of 0.213157025 and 0.207067988 respectively). From this two, I would take 0.213157025 because its higher. I then produce C and D accordingly by producing C in terms of putting the first and last number in each row with their corresponding A values in D.
a = [0.3598832410.2778152780.2475628380.262490330.2269895820.2131570250.2070679880.204762201];b =[3 4 0 0 0 0 03 4 5 0 0 0 03 4 5 7 6 0 03 4 5 7 0 0 03 4 5 7 8 0 03 4 5 7 8 10 03 4 5 6 9 8 103 4 5 7 8 10 11];
I would like to produce C and D
C =[3 4 3 5 3 6 3 7 3 8 3 10 3 11]D = [0.3598832410.2778152780.2475628380.262490330.2269895820.2131570250.204762201];
Best Answer