I have two 2D list
list1 = {{x,a1},{y,a2},{z,a3}}
list2 = {{x,b1},{y,b2},{z,b3}}
I want a list that divides only the second element of each element of the 2D array.
list3 = {{x,a1/b1},{y,a2/b2},{z,a3/b3}}
I know how to do this using a loop, but I want to know is there an elegant way using mathematica?
MapThread[{First[#1], Last[#1]/Last[#2]} &, {list1, list2}]
orThread[{list1[[All, 1]], list1[[All, 2]]/list2[[All, 2]]}]
$\endgroup$list1/{1, Last@#} & /@ list2
$\endgroup$list1/(ReplacePart[#, 1 -> 1] & /@ list2)
$\endgroup$list1/({1, Last@#} & /@ list2)
$\endgroup$