t = 0;
for i = 1:10000
n = 0;
t = t+0.01;
x1 = -10;
while x1 < 10
x2 = x1+t;
y1 = sin(x1);
y2 = sin(x2);
if abs(y1-y2) > 0.005
n = n+1;
end
x1 = x2;
end
if n == 0
break;
end
end
t