MATLAB: How to get a script to only give me the number of elements less than 2

array

I have a script in which y equals 100 various numbers. I was able to sort the numbers in order from least to greatest, but I need the script to give me the amount of numbers that are less than 2. How would I go about doing this?

Best Answer

nnz(y<2);
Related Question