Technical Things Around Me
Showing posts with label
sort
.
Show all posts
Showing posts with label
sort
.
Show all posts
How to Sort a Vector With the Same Order As Other Vector in Matlab
Example :
A = [5 3 4 1 2]; B = [-6 -8 -7 -10 -5];
Answer :
C = sortrows([A.' B.']);
or
[A, idx] = sort(A); B = B(idx);
Older Posts
Home
Subscribe to:
Posts (Atom)