how to find the number of negative cells in matrix ?
4 views (last 30 days)
Show older comments
how to find the number of negative cells in matrix
0 Comments
Accepted Answer
Voss
on 12 Nov 2022
A = randn(5) % 5-by-5 random matrix
nnz(A < 0) % number of elements of A that are < 0
More Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!