I have matrix
A=[2 3 4 5 6 7; 7 6 5 4 3 2]
I want to count how many number of elements have a value greater than 3 and less than 6.
flatA = A(:); count = sum(flatA > 3 & flatA < 6);
2.1m questions
2.1m answers
60 comments
57.0k users