for A=14.5:0.1:14.8 [t,y] = ode45(@ydot,[0 1000], [0.01, 0]); if min(abs(y(:,1)-pi))<0.25 break; else continue; end end