3、12*02^2=ac*cos(4)2)-ll*wl*2*sin((I)1)+12*a2*cos((])2)T2*a)2"2*sin((I)2)=0三、實驗程序編寫以下函數(shù)中,各變量所代表的值:th:4)1x(l):(J)2y⑴:32z(l):u2x(l):Xcy(2):Vcz(2):Sc位移函數(shù):functionf=funl(x/th)11=0.3;12=1;f=[ll*sin(th)+l2*sin(x(l));Il*cos(th)+l2*cos(x(l))-x⑵];速度函數(shù):functionf=fun2(y
4、/x,th)11=0.3;12=1;wl=2*pi;f=[ll*wl*sin(th-x(l))+y(2)*cos(x(l));Il*wl*cos(th)+I2*y(l)*cos(x(l))];加速度函數(shù):functionf=fun3(z,y,x,th)11=0.3;12=1;wl=2*pi;f=[ll*(wlA2)*cos(th-x(l))+l2*(y(l)A2)+z(2)*cos(x(l));-H*(wlA2)*sin(th)+l2*z(l)*cos(x(l))-l2*(y(l)A2)*sin(x(l))]
5、;主函數(shù):th=0:pi/18:2*pi;t=0:l/36:l;yi=[0;0];y2=[0;0];y3=[O;oj;xl=zeros(37,2);x2=zeros(37,2);x3=zeros(37,2);fori=l:1:37xxl=fsolve(0funl,yl,optimset(1fsolve1)zth(i));X1(i,1)=xxl(1,1);xl(iz2)=xxl(2zl);yl=xxl;xx2=fsolve(0fun2,y2,optimset(1fsolve1),xxl,th(i));x2(i,
6、1)=xx2(1,1);x2(iz2)=xx2(2,l);y2=xx2;xx3=fsolve(0fun3,y3zoptimset(ffsolve1)rxx29xxlAth(i));x3(iz1)=xx3(1,1);x3(i,2)=xx3(2,1);y3=xx3;endsubplot(2孑3孑1)plot(t,xl(:,1));title('t-phi2曲線')xlabel('t')ylabel('phi2')subplot(2,3,4)plot(t,xl(:,2));title('t-xc曲線')xlab
7、el('t')ylabel('Xc')subplot(2,3,2)plot(t,x2(:,1));title('t-omega2tt^fe*)xlabel('t')ylabel('omega2')subplot(2,3,5)plot(t,x2(:,2));title('t-vc曲線')xlabel('t')ylabel('Vc')subplot(2,3,3)plot(t,x3(:,1));title(吐-alpha2曲線Txlabel('t')ylabel('alpha2')subplot(2,3,6
8、)plot(t,x3(:,2));title('t-ac曲線')xlabel('t')ylabel('ac')四、計算機(jī)求解結(jié)果與分析數(shù)據(jù)表格:t(s)4)2(rad)32(rad/s)a2(rad/sA2)Xc(m)Vc(m/s)Ac(m/sA2)0.000.00-1.880.001.300.00-15.400.03-0.05-1.861.881.29-0.42-15.020.06-0.10-1.