I have several cell-type variables A{Y,1}(Z x 13 cells) all sorted by column C. I need to assign a ranking (add column R) for the corresponding sorting order.
Example for a B {Y,1} (8 x 3 cells). My original cell is:
A B C MJ 65 0 MJ 321 0,0125 MJ 2 0,0125 MJ 1987 0,0125 MJ 87 0,02 MJ 5 0,0375 MJ 743 0,0375 MJ 124 0,05
I would like to rank (column R) each A{Y,1} cell-type, considering that in case of tie, the mean value should be assigned.
A B C RMJ 65 0 1MJ 321 0,0125 3 %Assign mean value
MJ 2 0,0125 3MJ 1987 0,0125 >> 3MJ 87 0,02 5MJ 5 0,0375 6,5 %Assign mean valueMJ 743 0,0375 6,5MJ 124 0,05 8
Thanks for your help.
Best Answer