How to find which postions in a vector has negative values and output them?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
sairohith mudduluru
am 17 Feb. 2018
Kommentiert: Stephen23
am 19 Feb. 2018
i have a vector and need to find the postions which has negative values
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Stephen23
am 17 Feb. 2018
find is not required, logical indexing is simpler and more efficient:
B = A(A<0)
2 Kommentare
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!