matlab出现错误,求大神!在线等d=14.6;d1=14.4;d2=12.4;h1=0.32;L=0.75;h2=5;x1=60;x2=14;h3=13.2;h4=2.2;a=Li=0for h=0:0.2:17.2; i=i+1S0(i)=pi*d2.^2/4+pi*(d.^2-d1.^2)/4;%S1(i)=pi*d*h(i);S2(i)=pi*(d.^2-d1.^2)/4;S3(i)=(h(i)-h1)*L;S4(i)=pi*(d.^2-d

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 21:56:55

matlab出现错误,求大神!在线等d=14.6;d1=14.4;d2=12.4;h1=0.32;L=0.75;h2=5;x1=60;x2=14;h3=13.2;h4=2.2;a=Li=0for h=0:0.2:17.2; i=i+1S0(i)=pi*d2.^2/4+pi*(d.^2-d1.^2)/4;%S1(i)=pi*d*h(i);S2(i)=pi*(d.^2-d1.^2)/4;S3(i)=(h(i)-h1)*L;S4(i)=pi*(d.^2-d
matlab出现错误,求大神!在线等
d=14.6;
d1=14.4;
d2=12.4;
h1=0.32;
L=0.75;
h2=5;
x1=60;
x2=14;
h3=13.2;
h4=2.2;
a=L
i=0
for h=0:0.2:17.2;
i=i+1
S0(i)=pi*d2.^2/4+pi*(d.^2-d1.^2)/4;%
S1(i)=pi*d*h(i);
S2(i)=pi*(d.^2-d1.^2)/4;
S3(i)=(h(i)-h1)*L;
S4(i)=pi*(d.^2-d1.^2)/4+2*(h(i)-h1)*L;
b(i)=2*(h(i)-h2)*tand(x1/2)+L
h0(i)=h(i)-h2
S5(i)=(a+b(i))*h0(i)/2;
S6(i)=pi*(d.^2-d1.^2)/4+2*(h(i)-h1)*L+(a+b(i)).*h0(i)./2;
S7(i)=2.*L.*(h2-h1)+2*(h3-h2).*(L+tand(x1/2).*(h3-h2))+pi*d.^2/4*cosd(x2)-pi*...
(d/2-(cosd(x2)).^2.*((h(i)-h3).*tand(x2)+d/2-d1/2)).*(d/2/cosd(x2).*...
((h(i)-h3).*tand(x2)+d/2-d1/2));
S8(i)=pi*d^2/4;
if h

matlab出现错误,求大神!在线等d=14.6;d1=14.4;d2=12.4;h1=0.32;L=0.75;h2=5;x1=60;x2=14;h3=13.2;h4=2.2;a=Li=0for h=0:0.2:17.2; i=i+1S0(i)=pi*d2.^2/4+pi*(d.^2-d1.^2)/4;%S1(i)=pi*d*h(i);S2(i)=pi*(d.^2-d1.^2)/4;S3(i)=(h(i)-h1)*L;S4(i)=pi*(d.^2-d
i=0
for h=0:0.2:17.2;
i=i+1
这里最好不要这样写;将这三句不要;修改一下即可:
h=0:0.2:17.2;
for i=1:length(h)