matlab程序 帮改成正常的 f1=pi/2;f2=11*pi/18;f3=4*pi/9;f4=4*pi/9;r=10;e=80;s0=100;h=100;x=sym('x');s1=h.*[x/f1-sin(2*pi/f1.*x)/(2*pi)];x1=(s0+s1).*cos(x)-e.*sin(x);y1=(s0+s1).*sin(x)+e.*cos(x);dx1=diff(x1,'x');dy1=diff(y1,'x');X1=x1-r*(dy1./((

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/23 13:11:42
matlab程序帮改成正常的f1=pi/2;f2=11*pi/18;f3=4*pi/9;f4=4*pi/9;r=10;e=80;s0=100;h=100;x=sym(''x'');s1=h.*[x/f1-

matlab程序 帮改成正常的 f1=pi/2;f2=11*pi/18;f3=4*pi/9;f4=4*pi/9;r=10;e=80;s0=100;h=100;x=sym('x');s1=h.*[x/f1-sin(2*pi/f1.*x)/(2*pi)];x1=(s0+s1).*cos(x)-e.*sin(x);y1=(s0+s1).*sin(x)+e.*cos(x);dx1=diff(x1,'x');dy1=diff(y1,'x');X1=x1-r*(dy1./((
matlab程序 帮改成正常的
f1=pi/2;
f2=11*pi/18;
f3=4*pi/9;
f4=4*pi/9;
r=10;
e=80;
s0=100;
h=100;
x=sym('x');
s1=h.*[x/f1-sin(2*pi/f1.*x)/(2*pi)];
x1=(s0+s1).*cos(x)-e.*sin(x);
y1=(s0+s1).*sin(x)+e.*cos(x);
dx1=diff(x1,'x');
dy1=diff(y1,'x');
X1=x1-r*(dy1./(((dx1).^2+(dy1).^2).^(0.5)));
Y1=y1+r*(dx1./(((dx1).^2+(dy1).^2).^(0.5)));
y=sym('y');
s2=h;
x2=(s0+s2).*cos(y)-e.*sin(y);
y2=(s0+s2).*sin(y)+e.*cos(y);
dx2=diff(x2,'y');
dy2=diff(y2,'y');
X2=x2-r*(dy2./(((dx2).^2+(dy2).^2).^(0.5)));
Y2=y2+r*(dx2./(((dx2).^2+(dy2).^2).^(0.5)));
z=sym('z');
t=(z-f1-f2)/f3;
s3=h.*[1-(10*t.^3-15*t.^4+6*t.^5)];
x3=(s0+s3).*cos(z)-e.*sin(z);
y3=(s0+s3).*sin(z)+e.*cos(z);
dx3=diff(x3,'z');
dy3=diff(y3,'z');
X3=x3-r.*(dy3./(((dx3).^2+(dy3).^2).^(0.5)));
Y3=y3+r.*(dx3./(((dx3).^2+(dy3).^2).^(0.5)));
p=sym('p');
s4=0;
x4=(s0+s4).*cos(p)-e.*sin(p);
y4=(s0+s4).*sin(p)+e.*cos(p);
dx4=diff(x4,'p');
dy4=diff(y4,'p');
X4=x4-r*(dy4./(((dx4).^2+(dy4).^2).^(0.5)));
Y4=y4+r*(dx4./(((dx4).^2+(dy4).^2).^(0.5)));
x=[0:0.01:pi/2];
y=[pi/2:0.01:10*pi/9];
z=[10*pi/9:0.01:14*pi/9];
p=[14*pi/9:0.01:2*pi];
X1=eval(X1);Y1=eval(Y1);
X2=eval(X2);Y2=eval(Y2);
X3=eval(X3);Y3=eval(Y3);
X4=eval(X4);Y4=eval(Y4);
x1=eval(x1);y1=eval(y1);
x2=eval(x2);y2=eval(y2);
x3=eval(x3);y3=eval(y3);
x4=eval(x4);y4=eval(y4);
plot(X1,Y1,X2,Y2,X3,Y3,X4,Y4);

matlab程序 帮改成正常的 f1=pi/2;f2=11*pi/18;f3=4*pi/9;f4=4*pi/9;r=10;e=80;s0=100;h=100;x=sym('x');s1=h.*[x/f1-sin(2*pi/f1.*x)/(2*pi)];x1=(s0+s1).*cos(x)-e.*sin(x);y1=(s0+s1).*sin(x)+e.*cos(x);dx1=diff(x1,'x');dy1=diff(y1,'x');X1=x1-r*(dy1./((
程序能运行

能不能把你的程序报错贴上来ne ?