I have a list:
list = {{1,1,0.05,0.05}, {2,2,0.05,0.05}};
and I want to do this change
Replace[#[[1]], #[[1]] -> (#[[1]] + #[[3]])]& /@ list
Replace[#[[2]], #[[2]] -> (#[[2]] + #[[4]])]& /@ list
The problem is that the initial list doesn't change.
My list represents $\{\{x, y, v_x, v_y\}, \{x, y, v_x, v_y\}\} $ and I want to use a replacement rule to change the position of the objects and thereby represent movement.
a[[All,1]]=a[[All,1]] +a[[All, 3]]whereais your list. I know it is not functional, but simple and direct. – Nasser Jan 3 at 21:05