I have made the following code in order to look for matching rows on a subset of 2D matrices. That is, my "keys" matrices is a 2D lookup table, from where at each