for i=1:100 if 1-abs(sin(i))<=0.0001 break end end