I'm relatively new to MATLAB, but I'm trying to create a loop that runs through one column in matrix X, matches the value to another column in matrix Y, and then feeds the corrosponding values in the second and third columns of matrix Y into the second and third columns of matrix X?

I've been trying to use two for loops, however i cant get it to refence the second and thtird columns. How would i go about doing this?

Thanks!!

## Best Answer