How to find positive values in 1500 matrices(720*1280)?
6 ビュー (過去 30 日間)
古いコメントを表示
![WeChat Screenshot_20190426114417.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/216742/WeChat%20Screenshot_20190426114417.png)
I've got a data like this. Each file contains zero and some positive values or all zeros.
I want to find which matrix contains positive values.
0 件のコメント
回答 (2 件)
KSSV
2019 年 4 月 26 日
If A is your matrix.
idx = A>0 ; % this gives indices of posittive values
idx = sign(A) % this gives sign of values in A
A(A>0) % this gives values in A which are greater than 0
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!