How to find which postions in a vector has negative values and output them?
1 回表示 (過去 30 日間)
古いコメントを表示
i have a vector and need to find the postions which has negative values
0 件のコメント
採用された回答
その他の回答 (1 件)
Stephen23
2018 年 2 月 17 日
find is not required, logical indexing is simpler and more efficient:
B = A(A<0)
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!