% 三维曲面绘制
clc
clear
close all
[x,y] = meshgrid(-8:0.5:8);
z = sin(sqrt(x.^2+y.^2))./sqrt(x.^2+y.^2+eps);
subplot(2,2,1);
mesh(x,y,z);
title('mesh(x,y,z)');
subplot(2,2,2);
meshc(x,y,z);
title('meshc(x,y,z)');
subplot(2,2,3);
meshz(x,y,z)
title('meshz(x,y,z)');
subplot(2,2,4);
surf(x,y,z)
title('surf(x,y,z)');
运行效果

该代码使用MATLAB进行三维曲面的绘制,包括mesh、meshc、meshz和surf函数的应用,展示了不同方式展示三维图形的效果。
2395

被折叠的 条评论
为什么被折叠?



