count = 0; for i = 1:100 if (sin(i)>0) count = count + 1; end end count