How to find index of rows without -999

1 view (last 30 days)
I have a super long matrix like the below:
-5, 25, 35
-999, 8, 12
5, 7, 16
8, 9, -999
-999, -999, -999
22, 3, -999
How do I find the rows without any -999 (rows # 1 and 3 in this case) without writing a loop?
Thanks.

Accepted Answer

Walter Roberson
Walter Roberson on 6 Dec 2019
find(~any(YourArray == -999,2))

More Answers (0)

Tags

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!