I have two lists of the form:
list1 = {{1, 2.003}, {3, 2.01}, {2, 1.0011}};
list2 = {{2, 1.001}, {3, 2.0034}, {2, 1.0001}};
I want to do the following:
Get the absolute value of subtracting each two second sub-elements in the two lists from each other. For example {1, 2.003}
from list1
and {3, 2.0034}
from list2
. $|2.003-2.0034|$ and if it is in the range from 0.0001 to 0.001 subtract their corresponding first items i.e. $|1-3|$ in absolute value also.
How to do that for all the elements in the two lists in Mathematica?