Delete entire row of an array

How can I remove the entire row if either value is less than 5:
Coord =
2 3
2 39
1 88
9 74
10 93
16 28
16 50

 Accepted Answer

Stephen23
Stephen23 on 13 Jan 2016
Edited: Stephen23 on 13 Jan 2016
>> Coord = [2,3;2,39;1,88;9,74;10,93;16,28;16,50];
>> Coord(any(Coord<5,2),:) = []
Coord =
9 74
10 93
16 28
16 50

More Answers (1)

Alternatively:
Coord = Coord(~sum(Coord<5,2),:)
Coord =
9 74
10 93
16 28
16 50

Categories

Find more on Operators and Elementary Operations in Help Center and File Exchange

Asked:

on 13 Jan 2016

Commented:

on 13 Jan 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!