Hello everyone,
I'm trying to develop a modest skill in mapping functions and I've
been working on this problem.
Suppose I have two 100 x 4 matrices, X and Y, and I want to see
whether each value in a column of X is bigger than each value in the
corresponding column of Y. In other words, compare column 1 of X with
column 1 of Y, column 2 of X with column 2 of Y, and so on.
It's easy to generate a 100 x 4 table of Booleans using Table as
Table[Boole[X[[i , j]] > Y[[i, j]]], {i, 100}, {j, 4}]
But what about without Table? I am able to do it for the comparison
of any one column as
Boole[#[[1]] > #[[2]]] & /@ Transpose[{X[[All, ]], Y[[All, 1]]}]
but I'm not sure how to extend this to other columns. Any tip would
be much appreciated.
Regards,
Gregory