Next, I have two vectors each with a numeric sequence. Let's call them Array1
and Array2
. The values are below ...
Array1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
Array2 = [7, 6, 3, 9, 4, 5, 1, 10, 8, 2];
My question is how I would sort Array1 values, making the order of values equal to Array2. For example, in place of Array1 whose value is "1", it would put the value that is in the same position (index), but in Array2. In case he would trade for "7". Anyway, would anyone have a hunch?