为什么画不出图形呢,没有报错啊

2019-07-17 12:51发布

L=460;
alpha=pi/3;
x=[];
y=[];
z=[];
for m=1:100
for n=0:100
     for p=1:100
         for q=0:100
  theta1=1/100*pi*m;
   delta1=1/25*pi*n;
   theta2=1/100*pi*p;
   delta2=1/25*pi*q;
x=(L*(sin(theta2) - 1)*(sin(alpha - delta1 + delta2)*sin(delta1) - cos(alpha - delta1 + delta2)*cos(delta1)*sin(theta1)))/(pi/2 - theta2) - (L*cos(delta1)*(sin(theta1) - 1))/(pi/2 - theta1) + (L*cos(delta1)*cos(theta1)*cos(theta2))/(pi/2 - theta2);
y=(L*sin(delta1)*cos(theta1)*cos(theta2))/(pi/2 - theta2) - (L*(sin(theta2) - 1)*(sin(alpha - delta1 + delta2)*cos(delta1) + cos(alpha - delta1 + delta2)*sin(delta1)*sin(theta1)))/(pi/2 - theta2) - (L*sin(delta1)*(sin(theta1) - 1))/(pi/2 - theta1);
z=(L*cos(theta1))/(pi/2 - theta1) + (L*cos(theta2)*sin(theta1))/(pi/2 - theta2) + (L*cos(alpha - delta1 + delta2)*cos(theta1)*(sin(theta2) - 1))/(pi/2 - theta2);

         end
      end
end
end
plot3(x,y,z);hold on;grid on

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。