figure(1)u=-0.1:0.005:0.1;v=-0.1:0.005:0.1;[x,y]=meshgrid(u,v);z=sin(x-y)./abs(x)+abs(y);surf(x,y,z);hold on% contourf(x,y,z)% ezplot('x+y=3')% set(gca,'DataAspectRatio',[1 1 60])%axis equal
clcclearu=-3:0.1:3;v=-3:0.1:3;[x,y]=meshgrid(u,v);z=2.*x.^2 +3.*y.^2;surf(x,y,z);hold ont=0:0.1:3;x1=t;y1=t;z1=30-5*t;plot3(x1,y1,z1,'r');plot3(0,0,30,'r*')quiver3(2, 2, 20,8/8,12/8,-1/8,'g') % 后面向量的3个分量除8是为了缩短长度grid onset(gca,'DataAspectRatio',[1 1 5])%axis equal
p点坐标(2,2,20)