clc,clear,close all
x=-20:1:20;
y=-20:1:20;
[x,y]=meshgrid(x,y);
z=x.^2+y.^2;
surf(x,y,z)
colormap(jet)%颜色映射,蓝色开始,红色结束
绘图如下:
clc,clear,close all
x=-20:1:20;
y=-20:1:20;
[x,y]=meshgrid(x,y);
z=x.^2+y.^2;
surf(x,y,z)
colormap(jet)%颜色映射,蓝色开始,红色结束
绘图如下: