曲线');text(2,38,'红线代表理想转角的变化曲线','FontSize',8,'backgroundcolor',[10.40.4]);text(2,36,'蓝线代表实际转角的变化曲线','FontSize',8,'backgroundcolor',[0.40.41]);text(2,34,'绿线代表优化后转角的变化曲线','FontSize',8,'backgroundcolor',[0.610.8]);holdonEnd%子函数,定义个变量的意义functionlt=lamta(d,fil)lt=acos((cos(d))^2+(sin(d))^2*cos(fil));endfunctiona1=alfa(fi,d,fil,w)a1=asin(-cos(fi)*cos(d)-sin(fi)*sin(d)*cos(fil-w));endfunctiona2=alfa2(fi,d,fir,w)a2=asin(-cos(fi)*cos(d)-sin(fi)*sin(d)*cos(fir+w));endfunctiond=Di(fi,a,dt)d=acos(-cos(fi)*sin(a*pi/180)-sin(fi)*cos(a*pi/180)*cos(dt));endfunctionw=Ww(a,dt,d)w=asin(cos(a*pi/180)*sin(a*pi/180)/sin(d));endfunctiondt=delta(r,fi)dt=asin(sin(r*pi/180)/sin(fi));endfunctionfi=fii(r,b)fi=acos(cos(r*pi/180)*cos(b*pi/180));endfunctionfir=fiir(A,B,C,fi0)fir=fi0-2*atan((B+(sqrt(A^2+B^2-C^2)))/(A-C));