## comparing two matrices cell-by-cell, plane-by-plane

Apr 26 2013 | 5:49 pm
Hello i'm tearing my hairs over a problem, possibly a bug... I'm trying to compare 2 matrices, find if one plane of a cell in the first matrix is inferior to the same plane of the cell with the same coordinates, in a second matrix. My matrices have 3 plane in one dimension of varying size (trying with size of 3 atm).
Whatever i try, the comparison just works for the first cell. Each plane of the first cell from the first matrix is compared to each plane of the first cell of the second matrix, and the resulting matrix has a 1 in each plane where the value in the first matrix is less or equal than the corresponding value in the secodn matrix. What is really odd is that the other cells of the first incoming matrix are not compared with the 2d input matrix's corresponding cells, but rather they are compared with a 3., which is a value that is used for initialisaiton of each plane/cell in the 2d matrix. But the value of each cell/plane in the second matrix change often, i can see their actual value in the jit.cellblock (which are not 3.), and i have connected a bang out of that 2d cell to check that there is not a change in that matrix so fast that i wouldn't see it which would explain the comparison.
Here is the relevant portion of the patch. The "first matrix" i keep refering to comes from the "r positions" and the second matrix comes from the "jit.matrix scaleoftriggers". There is two way of calculating the thing : oen with jit.op @op