1 | initial version |
Given the Matrix M, I threshold it (binary) with threshold value a, the ouput is A. Then I threshold M again (binry inverted) with value b, the output is B. Then if I multiply A and B component wise (Hadamard product) I should get what I want.
But I found the "inrange" function which does that automatically.