matlab 曲线求导syms x1 x2 x3 x4y1=50/2*(1-cos(2*x1));dy1=diff(y1) ; X1=0:pi/1000:pi/2;Dy1=subs(dy1,X1);y2=50;dy2=diff(y2) ; X2=pi/2:pi/1000:pi;Dy2=subs(dy2,X2);y3=50-50/2*(1-cos(2*x3));dy3=diff(y3) ; X3=pi:pi/1000:3*pi/2;Dy3=subs(dy3,X3);y4=0;dy4
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/30 10:16:41
matlab 曲线求导syms x1 x2 x3 x4y1=50/2*(1-cos(2*x1));dy1=diff(y1) ; X1=0:pi/1000:pi/2;Dy1=subs(dy1,X1);y2=50;dy2=diff(y2) ; X2=pi/2:pi/1000:pi;Dy2=subs(dy2,X2);y3=50-50/2*(1-cos(2*x3));dy3=diff(y3) ; X3=pi:pi/1000:3*pi/2;Dy3=subs(dy3,X3);y4=0;dy4
matlab 曲线求导
syms x1 x2 x3 x4
y1=50/2*(1-cos(2*x1));
dy1=diff(y1) ;
X1=0:pi/1000:pi/2;
Dy1=subs(dy1,X1);
y2=50;
dy2=diff(y2) ;
X2=pi/2:pi/1000:pi;
Dy2=subs(dy2,X2);
y3=50-50/2*(1-cos(2*x3));
dy3=diff(y3) ;
X3=pi:pi/1000:3*pi/2;
Dy3=subs(dy3,X3);
y4=0;
dy4=diff(y4) ;
X4=3/2*pi:pi/1000:pi*2;
Dy4=subs(dy4,X4);
plot(X1,Dy1,'.',X2,Dy2,'.',X3,Dy3,'.',X4,Dy4,'.')
Error using ==> plot
Vectors must be the same lengths.
matlab 曲线求导syms x1 x2 x3 x4y1=50/2*(1-cos(2*x1));dy1=diff(y1) ; X1=0:pi/1000:pi/2;Dy1=subs(dy1,X1);y2=50;dy2=diff(y2) ; X2=pi/2:pi/1000:pi;Dy2=subs(dy2,X2);y3=50-50/2*(1-cos(2*x3));dy3=diff(y3) ; X3=pi:pi/1000:3*pi/2;Dy3=subs(dy3,X3);y4=0;dy4
diff是求差的 肯定比原来少了一个数据 导致维数不对 作图出错