I have a matrix with thousands of rows and want the submatrix comprising the rows of the original matrix that have, e.g. a negative element in column 3. How to do that?
I think this question is reasonably a duplicate of: How to find rows that have maximum value? (or several similar questions) and I will delete this answer if it is closed as such. Nevertheless, again for reference:
Faster in versions 8+ should be to use
In version 7 optimal speed may be had with:
Timings compared to other methods proposed, in version 7:
|show 5 more comments|