This question is closed. Reopen it to edit or answer.
How to sort a vector according to another vector
1 view (last 30 days)
I have a desired vector u of order 1x6 i.e. one row and 6 columns. Likewise I generate another random vector of same size 1x6. The arrangement of elements in that random vector is varying. Now I want to get such a random number which is nearly the same as my u vector. And also I want to re-arrange the elements of that random vector according to the arrangment of my u vector. How can I do that?