I'm trying to find a count of all the numbers in an array that are less than 2. I set up my code like this:
(y was already defined earlier)
%Determine the number of y-values less than the number 2.0.
%Display only the number of y-values less than the number 2.0.
disp('The number of values less than two is')
Yet whenever I try to run this, Matlab always says:
"Array indices must be positive integers or logical values."
Error in BasicSorts1 (line 35)
Why is Matlab telling me this?