MATLAB: Finding value less than a threshold

findsearch

Hi, suppose I have a matrix A as follows:
A =
1 2 3
3 3 6
4 6 8
4 7 7
I need to find the number of values of matrix A having value less than 6.
How to do this?
Thanks in advance

Best Answer

sum(A(:)<6)