Here is an example:
>> A = randi( 20, 10, 5 )
A =
17 4 14 15 9
19 20 1 1 8
3 20 17 6 16
19 10 19 1 16
13 17 14 2 4
2 3 16 17 10
6 9 15 14 9
11 19 8 7 13
20 16 14 20 15
20 20 4 1 16
>> threshold = 4 ;
>> B = A(all( A > threshold, 2 ),:)
B =
6 9 15 14 9
11 19 8 7 13
20 16 14 20 15
PS: if you need to remove these rows, you can do it as follows:
>> isAllAbove = all( A > threshold, 2 ) ;
>> B = A(isAllAbove,:)
B =
6 9 15 14 9
11 19 8 7 13
20 16 14 20 15
>> A(isAllAbove,:) = []
A =
17 4 14 15 9
19 20 1 1 8
3 20 17 6 16
19 10 19 1 16
13 17 14 2 4
2 3 16 17 10
20 20 4 1 16
Best Answer