I have the following vectors:
posicao_1 = [4, 62, 24, 18, 47, 62, 63, 78, 68, 87, 24, 18, 6, 8, 12, 17]
posicao_2 = [43, 61, 21, 19, 46, 63, 68, 72, 66, 89, 29, 10, 8, 7, 6, 15]
I need to look at the vector POSITION_1 the value [24, 18].
posicao_1 = [4, 62, **24, 18**, 47, 62, 63, 78, 68, 87, **24, 18**, 6, 8, 12, 17]
We can see that they are found in the indexes [2, 3] and [10, 11] of the POSITION_1 vector.
After locating these values, I need to traverse the POSITION_2 vector and assign random and EQUAL values to the INDEXES [2, 3] and [10, 11] that I found in the POSITION_1 vector. For example:
You would have to assign random and EQUAL values:
posicao_2 = [43, 61, **21, 21**, 46, 63, 68, 72, 66, 89, **21, 21**, 8, 7, 6, 15]
Could someone please help me?
Sorry, if it was not very clear, I tried to explain as much as possible!