I have this matrix...
mat = Table[{k, 0}, {k, 0, limit}];
After a series of dynamic iterative operations, some of the 0 initialized entries (i.e., those of the 2nd column of mat, i.e., mat[[All, 2]]) are replaced w/ positive integers, e.g.,
mat = {{0,78},{1,0},{2,0},{3,11},{4,11},{5,11},...,{limit,0}}
I realize that there are several standard ways for retrieving the nth minimum value of mat[[All, 2]] but, since mat has so many 0s, they do not help me.
I am looking for a standard/elegant/efficient way to find the nth UNIQUE min value of mat, along w/ its associated row index, e.g., if limit = 6 & I wanted to find the 2nd min-value/index pair, executing...
Print[UniqueMin[mat[[All, 2]], 2]];
would output...
{4,11}
Bc 11 was the 2nd smallest unique value in mat & row 4 was where it 1st occurred.
{4,11}
, not{3,11
}? $\endgroup$