Reputation: 21
Given a matrix/list of lists M:(1 9 10;120 50 199;15 20 7) Return only the rows where every element in the row is greater than 5.
Upvotes: 1
Views: 243
Reputation: 721
You may also find this usefull as well:
q){if[all x<M y;:M y]}[8]'[til count M]
Even though the previous solutions seem to be slightly more efficient, a function is always useful.
Upvotes: 1
Reputation: 13657
Could use
M where 5<min flip M
Or a slight alternative to Seans
M where all flip M>5
Upvotes: 1