A is an n by n matrix. B is an n by 1 matrix.
I would like to find the last instance of an element in each row of A being greater than the element in the corresponding row of B, and return an n by 1 list of indices.
A = [1 3 2;
2 5 -1;
0 2 3]
B = [1;
idx = [3;
I'm sure I could do this with a for loop, but would like to avoid it as the matrices are potentially very large.
Many thanks in advance.