The problem is to find locations or positions of all elements in a matrix that are larger or equal than some numerical value such as \(2\) in this example.
Mathematica
Matlab
Maple
Maple is little weak in this area. There does not seem to be a buildin function to return indices in matrix based on some condition. I searched ListTools and ArrayTools. So had to program it in.
A:=Matrix([[1,2,3],[2,1,-5],[6,0,0]]); seq(seq(`if`(A[i,j]>=2,[i,j],NULL),i=1..3),j=1..3);
|
[2, 1], [3, 1], [1, 2], [1, 3] |