How to find index of rows without -999

1 Ansicht (letzte 30 Tage)
Leon
Leon am 6 Dez. 2019
Kommentiert: Leon am 6 Dez. 2019
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.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 6 Dez. 2019
find(~any(YourArray == -999,2))

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by