Is there a way to set all entries of the matrix which meet a given criteria to an arbitrary value?
I've got a distance matrix and want to set all cells with values greater than some threshold to NaN for graphing purposes. What I do now is a double loop but is there any function or trick which...