1
Next, I have two vectors each with a numerical 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 doubt is how I would order the values of Array1, making the order of the values equal to that of Array2. For example, in place of Array1 whose value is "1", it would put the value that is in the same position (index), only in Array2. In case he would trade for the "7". Anyway, someone would have a guess?
Your example arrays are equal. In this case the two would be equal.
– Miguel
This is exactly what I intend to do, @Miguel . I order array1 from the position of the same values in array2
– Gabriel Polidoro