MATLAB: Number of values between constraints

lengthloopsMATLAB

t=linspace(0,pi,1001); y=floor(100.*sin(t));
Find the number of values of y between 25 and 71, inclusive.
Okay, so it's basically finding the length of the values in between the given range. I can tell that it'll require looping, but I don't know how to set it up. Thank you for any and all help

Best Answer

No reason to loop:
n = sum(x>=25&x<=71)