Skip to main content
4 of 8
added 155 characters in body
E. Chan-López
  • 31.3k
  • 3
  • 29
  • 50

Just another way using MapApply:

MapApply[Function[{x, y}, If[x > y, 1, 0]], Transpose[List[list1, list2]]]
(*{If[a > x, 1, 0], If[b > y, 1, 0], If[c > z, 1, 0]}*)

Another way Map:

If[#[[1]] > #[[2]], 1, 0] & /@ Transpose[List[list1, list2]]
(*{If[a > x, 1, 0], If[b > y, 1, 0], If[c > z, 1, 0]}*)

Another way using Outer:

Diagonal[Outer[If[#1 > #2, 1, 0] &, list1, list2]]
(*{If[a > x, 1, 0], If[b > y, 1, 0], If[c > z, 1, 0]}*)
E. Chan-López
  • 31.3k
  • 3
  • 29
  • 50