If i've got a matrix which is something like:
400 450 450 300
450 300 450 340
450 200 300 210
300 100 300 200
200 200 100 100
475 300 225 300
What is the best way to delete all columns which do not contain numbers between a specific range - for example 400-500 - at least twice or more. In this example, columns B and D will be removed as B contains a number in this range only once and D contains nothing within this range.
The desired output would be:
400 450
450 450
450 300
300 300
200 100
475 225
I've tried to use an IF statement to scan each column and move matches into a new matrix but this seems inefficient.