matlab小白,简单的公式计算绘图,求问大神为什么后面两个图画不出来?急求~谢谢了~ 5
l1=100l2=40l4=200ommiga1=10phi=0:2*pi/360:2*pi;l3=sqrt(l1^2+l4^2-l2^2-2*l1*l4*sin(phi...
l1=100
l2=40
l4=200
ommiga1=10
phi = 0:2*pi/360:2*pi;
l3 = sqrt(l1^2+l4^2-l2^2-2*l1*l4*sin(phi)) ;
figure(1)
plot(phi,l3)
y=(l3+sqrt(l3^2+l2^2-l1^2*cos(phi)^2))/(l2+l1*cos(phi))
theta2=atan(y)*2
theta3=theta2+45/pi
ommiga3=-l1*ommiga1*cos(theta3-phi)/l3
figure(2)
plot(ommiga3,phi)
y3=-1/sqrt(l1^2+l4^2-2*l1*l4*sin(phi))*(l1*l4*ommiga1*cos(phi))
alpha3=(l2*ommiga2^2*sin(theta3-theta2)-2*ommiga3*y3+l1*ommiga1.^2*sin(theta3-phi))/l3
figure(3)
plot(phi,alpha3) 展开
l2=40
l4=200
ommiga1=10
phi = 0:2*pi/360:2*pi;
l3 = sqrt(l1^2+l4^2-l2^2-2*l1*l4*sin(phi)) ;
figure(1)
plot(phi,l3)
y=(l3+sqrt(l3^2+l2^2-l1^2*cos(phi)^2))/(l2+l1*cos(phi))
theta2=atan(y)*2
theta3=theta2+45/pi
ommiga3=-l1*ommiga1*cos(theta3-phi)/l3
figure(2)
plot(ommiga3,phi)
y3=-1/sqrt(l1^2+l4^2-2*l1*l4*sin(phi))*(l1*l4*ommiga1*cos(phi))
alpha3=(l2*ommiga2^2*sin(theta3-theta2)-2*ommiga3*y3+l1*ommiga1.^2*sin(theta3-phi))/l3
figure(3)
plot(phi,alpha3) 展开
1个回答
展开全部
% 向量的乘除、乘方必须加点(.* ./ .^)
l1=100;
l2=40;
l4=200;
ommiga1=10;
phi = 0:2*pi/360:2*pi;
l3 = sqrt(l1^2+l4^2-l2^2-2*l1*l4*sin(phi)) ;
figure(1)
plot(phi,l3)
y=(l3+sqrt(l3.^2+l2^2-l1^2*cos(phi).^2))./(l2+l1*cos(phi));
theta2=atan(y)*2;
theta3=theta2+45/pi;
ommiga3=-l1*ommiga1*cos(theta3-phi)./l3;
figure(2)
plot(ommiga3,phi)
y3=-1./sqrt(l1^2+l4^2-2*l1*l4*sin(phi)).*(l1*l4*ommiga1*cos(phi));
% ommiga2 未定义
% alpha3=(l2*ommiga2^2*sin(theta3-theta2)-2*ommiga3*y3+l1*ommiga1.^2*sin(theta3-phi))/l3
alpha3=(l2*ommiga1^2*sin(theta3-theta2)-2*ommiga3.*y3+l1*ommiga1^2*sin(theta3-phi))./l3;
figure(3)
plot(phi,alpha3)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询