I
Ivan Lima
Hello,
I have two 2-dimensional arrays A and B. I want to sort A along its
columns (axis=1) and then sort B along its columns in the same order
that A was sorted.
I tried:
sorted_A = sort(A,1)
sorted_B = take(B, argsort(A,1), 1)
but my last statement returns an array with an extra dimension. If A
is a 2x3 matrix I get a 2x2x3 matrix. What am I missing?
Thanks a lot,
I have two 2-dimensional arrays A and B. I want to sort A along its
columns (axis=1) and then sort B along its columns in the same order
that A was sorted.
I tried:
sorted_A = sort(A,1)
sorted_B = take(B, argsort(A,1), 1)
but my last statement returns an array with an extra dimension. If A
is a 2x3 matrix I get a 2x2x3 matrix. What am I missing?
Thanks a lot,