n=10;L=2;g=9.8;M=3.6; H0=0.2; h=0.6; m=0.27;
F=L/(4*n*M*H0^2)*(m*sqrt(2*g*h)+sqrt(2*m^2*g*h+4*M^2*H0*g))^2;    %第一问下的最小拉力 
t0=pi/2*sqrt(M*L/n/F);
a=sqrt(2*g*h);
v0=a*[tan(pi/180)*cos(pi/15),tan(pi/180)*sin(pi/15),-1];
xmin=[-0.1,-0.1,F-10,F-10];
xmax=[0.1,0.1,F+10,F+10];
%xm=[0.0737026079465291;0.00413946526444900;0.0141500001310562;0.0250924800376894;-0.00346164159666702;-0.0472426265086194;0.0520275397881584;-0.0491366503628402;-0.0812868891321784;0.0984855516237167;50.1833106253933;40.3780082115605;37.8553577728565;48.9403570473207;48.2630831355176;41.5340527974601;49.2352794463654;39.0171734314818;34.0929673322567;48.0541901107748];fv=0.031154366938995
%xm=[0.020296427937021;0.085382586930352;51.369533798531070;42.368487518481600],fv=0.020510562900680
xm=[0.084351945917343;0.025189961153441;46.695928678404854;44.430263262962455],fv=0.009911423852987;
%[xm, fv]=SimuAPSO(@angle1, 1000 ,0.8, 2, 2,xmin,xmax,500,4);
theta=angle1(xm);

