clc
close all
%% 三维绘制 mesh
[x1,y1] = meshgrid(-5:0.1:5);
z1 = x1.^2/3+y1.^2/5;
z2 = -(x1.^2/sqrt(3)+y1.^2/4.7);
figure(1),subplot(1,2,1);
mesh(z1);
hold on;
mesh(z2);
[x2,y2] = meshgrid(-8:0.2:8);%meshgrid函数:生成网格采样点的函数
z3 = sin(sqrt(x2.^2+y2.^2))./sqrt(x2.^2+y2.^2);
z4 = -sin(sqrt(x2.^2+y2.^2))./sqrt(x2.^2/3.6+y2.^2/4.1);
subplot(
matlab——1、二维曲线绘图
最新推荐文章于 2024-07-22 14:53:15 发布