Given lists of lists like a and b, I want to obtain an output like c.
a = {{2, 1, 0}, {1, 2, 1}}; b = {{2, 2, 0}, { 2, 2, 1}};
c = {{2, 0, 0}, {0, 2, 1}}
If the same position has a different value or zero, it should output zero. What's the elegant, non-loopy way of doing this?