新手使用matlab出现Error using ==> plot Vectors must be the same lengths.subplot(3,1,1)x1=-pi:pi/50:pi;y1=x.*cos(x);plot(x1,y1,'m.')grid on,title('y=xcosx'),xlabel('x轴'),ylabel('y轴')gtext('y=xcosx'),legend('y=xcosx')subplot(3,1,2)x2=pi:pi/50

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/15 08:36:22
新手使用matlab出现Error using ==> plot Vectors must be the same lengths.subplot(3,1,1)x1=-pi:pi/50:pi;y1=x.*cos(x);plot(x1,y1,'m.')grid on,title('y=xcosx'),xlabel('x轴'),ylabel('y轴')gtext('y=xcosx'),legend('y=xcosx')subplot(3,1,2)x2=pi:pi/50

新手使用matlab出现Error using ==> plot Vectors must be the same lengths.subplot(3,1,1)x1=-pi:pi/50:pi;y1=x.*cos(x);plot(x1,y1,'m.')grid on,title('y=xcosx'),xlabel('x轴'),ylabel('y轴')gtext('y=xcosx'),legend('y=xcosx')subplot(3,1,2)x2=pi:pi/50
新手使用matlab出现Error using ==> plot Vectors must be the same lengths.
subplot(3,1,1)
x1=-pi:pi/50:pi;
y1=x.*cos(x);
plot(x1,y1,'m.')
grid on,
title('y=xcosx'),xlabel('x轴'),ylabel('y轴')
gtext('y=xcosx'),legend('y=xcosx')
subplot(3,1,2)
x2=pi:pi/50:4*pi;
y2=x.*tan(1./x).*sin(x^3);
plot(x2,y2,'g*'),grid on,
title('y=xtan(1/x)sinx^3'),xlabel('x轴'),ylabel('y轴')
gtext('y=xtan(1/x)sinx^3'),legend('y=xtan(1/x)sinx^3')
subplot(3,1,3)
x3=1:1/50:8;
y3=exp(1./x).*sin(x);
plot(x3,y3,'rd'),grid on,
title('e^(1/3)sinx'),xlabel('x轴'),ylabel('y轴')
gtext('e^(1/3)sinx'),legend('e^(1/3)sinx')

新手使用matlab出现Error using ==> plot Vectors must be the same lengths.subplot(3,1,1)x1=-pi:pi/50:pi;y1=x.*cos(x);plot(x1,y1,'m.')grid on,title('y=xcosx'),xlabel('x轴'),ylabel('y轴')gtext('y=xcosx'),legend('y=xcosx')subplot(3,1,2)x2=pi:pi/50
subplot(3,1,2)
x2=pi:pi/50:4*pi;
y2=x.*tan(1./x).*sin(x^3); 改为y2=x.*tan(1./x).*sin(x.^3)