两个matlab程序不同clear;clc;z=5;r=0.0195;e1=0.13;e2=0.13;b=2*pi/z;l=0.039;n=0.01*pi;i=1;d(i)=947.99;c(i)=226/360*2*pi;A0(i)=r^2*e1*(2*sin(b/2)*cos(c(i))+0.5*e1*sin(b)*cos(2*c(i))-0.5*e1*b+b);AS(i)=0.5*r^2*e1*e2*(1+cos(c(i)-b/2)-0.5*e1*(sin(c(i)
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 08:05:56
两个matlab程序不同clear;clc;z=5;r=0.0195;e1=0.13;e2=0.13;b=2*pi/z;l=0.039;n=0.01*pi;i=1;d(i)=947.99;c(i)=226/360*2*pi;A0(i)=r^2*e1*(2*sin(b/2)*cos(c(i))+0.5*e1*sin(b)*cos(2*c(i))-0.5*e1*b+b);AS(i)=0.5*r^2*e1*e2*(1+cos(c(i)-b/2)-0.5*e1*(sin(c(i)
两个matlab程序不同
clear;
clc;
z=5;r=0.0195;e1=0.13;e2=0.13;b=2*pi/z;l=0.039;n=0.01*pi;
i=1;
d(i)=947.99;
c(i)=226/360*2*pi;
A0(i)=r^2*e1*(2*sin(b/2)*cos(c(i))+0.5*e1*sin(b)*cos(2*c(i))-0.5*e1*b+b);
AS(i)=0.5*r^2*e1*e2*(1+cos(c(i)-b/2)-0.5*e1*(sin(c(i)-b/2))^2)+0.5*r^2*e1*e2*(1+cos(c(i)+b/2)-0.5*e1*(sin(c(i)+b/2))^2);
V(i)=(A0(i)-AS(i))*l;
for i=1:75
c(i+1)=c(i)+n;
A0(i+1)=r^2*e1*(2*sin(b/2)*cos(c(i+1))+0.5*e1*sin(b)*cos(2*c(i+1))-0.5*e1*b+b);
AS(i+1)=0.5*r^2*e1*e2*(1+cos(c(i+1)-b/2)-0.5*e1*(sin(c(i+1)-b/2))^2)+0.5*r^2*e1*e2*(1+cos(c(i+1)+b/2)-0.5*e1*(sin(c(i+1)+b/2))^2);
V(i+1)=(A0(i+1)-AS(i+1))*l;
m(i)=d(i)*V(i);
d(i+1)=m(1,i)/V(i+1);
dv(i)=V(i+1)-V(i);
end
clear;
clc;
z=5;r=0.0195;e1=0.13;e2=0.13;b=2*pi/z;l=0.039;n=0.001*pi;
i=1;
d(i)=947.99;
c(i)=226/360*2*pi;
A0(i)=r^2*e1*(2*sin(b/2)*cos(c(i))+0.5*e1*sin(b)*cos(2*c(i))-0.5*e1*b+b);
AS(i)=0.5*r^2*e1*e2*(1+cos(c(i)-b/2)-0.5*e1*(sin(c(i)-b/2))^2)+0.5*r^2*e1*e2*(1+cos(c(i)+b/2)-0.5*e1*(sin(c(i)+b/2))^2);
V(i)=(A0(i)-AS(i))*l;
if c(i)
两个matlab程序不同clear;clc;z=5;r=0.0195;e1=0.13;e2=0.13;b=2*pi/z;l=0.039;n=0.01*pi;i=1;d(i)=947.99;c(i)=226/360*2*pi;A0(i)=r^2*e1*(2*sin(b/2)*cos(c(i))+0.5*e1*sin(b)*cos(2*c(i))-0.5*e1*b+b);AS(i)=0.5*r^2*e1*e2*(1+cos(c(i)-b/2)-0.5*e1*(sin(c(i)
把if改成while就行了,if本来就不是用来做循环的,它是一个判断语句.