I have
C={[7],[4],[1],[2],[1],[3]};A = [1 2 4 9; 6 9 9 13; 9 14 9 15; 11 14 11 14; 13 14 15 18; 11 16 11 16];thresh = 3;
I want to sort the cell array according to
1-find values bigger than 3
{[7],[4],[3]}
2- sort it from smallest (3) to largest
{[3],[4],[7]}
3- add the remaining value of C to C_new (in largest to smallest order)
C_new ={[3],[4],[7],[2],[1],[1]}
4- change the order of A according to C_new
[7] in C is correspond to [1 2 4 9] in A
result should be
C_new ={[3],[4],[7],[2],[1],[1]}A_new = [ 11 16 11 16; 6 9 9 13; 1 2 4 9; 11 14 11 14; 9 14 9 15; 13 14 15 18]
Best Answer