4、使用合适的单轴对数坐标函数绘制函数??= ????的图像 (其中1≤??≤10) MATLAB Code:
x = 1:0.01:10; y = exp(x.^2); semilogy(x,y,'b-.'); xlabel('x'),ylabel('y');
2
5、绘制圆锥螺线的图像并添加各种标注,圆锥螺线的参数方程为:
??
??=??????????
6
?? (0≤??≤20??)
??=????????6??
??=2??
MATLAB Code:
t = 0:pi/50:20*pi; x = t.*cos(pi/6*t); y = t.*sin(pi/6*t); z = 2*t;
plot3(x,y,z,'b'),grid on; title('圆锥螺线');
xlabel('x = tcost'); ylabel('y = tsint'); zlabel('z = 2t');
6、在同一个图形窗口画半径为1的球面、柱面 ??2+??2=1 以及极坐标图形 ρ= ??????4??,??∈[0,2??].
21
MATLAB Code:
subplot(1,2,1), sphere(100); hold on; cylinder; hold on;
t = 0:pi/50:2*pi; r = 0.5*sin(4*t); subplot(1,2,2); polar(t,r);
title('r = 0.5*sin4t');
7、用mesh与surf命令绘制三维曲面 z= ??2+3??2 的图像,并使用不同的着色效果及光照效果. MATLAB Code:
t = -3:0.1:3; [x,y] = meshgrid(t); z = x.^2+3*y.^2; subplot(1,2,1),
mesh(x,y,z),title('网格z = x^2+3y^2'),shading flat;
相关推荐: