作业帮 > 综合 > 作业

MATLAB绘图程序没错,只有坐标系没图

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/11 13:50:28
MATLAB绘图程序没错,只有坐标系没图
x=-10:0.5:10;
y=-10:0.5:10;
[x,y]=meshgrid(x,y);
z=(sin((x.^2+y.^2).^(1/2)))/((x.^2+y.^2).^(1/2));
subplot(2,2,1);
surf(x,y,z);
title('空间曲面图');
subplot(2,2,2);
mesh(z);
view(-20,15);
title('az=-37.5,t1=30');
subplot(2,2,4);
mesh(z);
view(0,0);
title('az=0,t1=0');


grid on;
x=-10:0.5:10;
y=-10:0.5:10;
[x,y]=meshgrid(x,y);
z=(sin((x.^2+y.^2).^(1/2)))./((x.^2+y.^2).^(1/2));
subplot(2,2,1);
surf(x,y,z);
title('空间曲面图');
subplot(2,2,2);
mesh(z);
view(-20,15);
title('az=-37.5,t1=30');
subplot(2,2,4);
mesh(z);
view(0,0);
title('az=0,t1=0');