How to find positive values in 1500 matrices(720*1280)?
9 次查看(过去 30 天)
显示 更早的评论
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!