|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
v=-30:30;
v=v*pi/180;
y1=atan(69/52*tan(v));
x1=0.23:1;
x2=0.23:1;
x3=0.23:1;
x4=0.23:1;
x5=0.23:1;
x6=0.23:1;
x7=-45*pi/180:15*pi/180;
x8=-15*pi/180:45*pi/180;
mid1=sqrt(1.2^2+x5.^2-2*1.2*x5.*cos(45*pi/180+x7));
mid2=acos((mid1.^2+x1.^2-x3.^2)./(2*x1.*mid1))...
-acos((1.2-x5.*cos(45*pi/180+x7))./mid1)...
-45*pi/180;
mid3=sqrt(1^2+x6.^2-2*1*x5.*cos(40*pi/180+x8));
mid4=acos((mid3.^2+x2.^2-x4.^2)./(2*x2.*mid3))...
-acos((1-x5.*cos(40*pi/180+x8))./mid3)...
-45*pi/180;
mid5=sqrt(1^2+x6.^2-2*1*x6.*cos(40*pi/180-v-x8));
mid6=acos((mid5.^2+x2.^2-x4.^2)./(2*x2.*mid5))...
-acos((1-x6.*cos(40*pi/180-v-x8))./mid5)...
-mid4-40*pi/180;
mid7=sqrt(1.2^2+x1.^2-2*1.2*x1.*cos(45*pi/180-mid6-mid2));
y2=acos((mid7.^2+x5.^2-x3.^2)./(2*x5.*mid7))...
-acos((1.2-x1.*cos(45*pi/180-mid6-mid2))./mid7)...
-x7-45*pi/180;
plot(v,y1,'k-',v,y2,'b:');
xlabel('v');
ylabel('y');
title('y-v');
legend('y1','y2');
grid on
本MATLAB程序需要画出y1(v)和y2(v)的图(二维);但是老是说发现minus
Matrix dimensions must agree.或time Matrix dimensions must agree
大家看看吧 谢谢,给我指出具体错误! |
|