[X,Y,Z]=sphere(50);Z(Z<0)=-(Z(Z<0));mesh(X,Y,Z)%画上半球面hold on;ezmesh('1.5-x-y',[-1 1])%画平面[x,y,z]=meshgrid(linspace(-1,1));contourslice(x,y,z,x+y+z-1.5,X,Y,Z,[0 0])%画交线axis equalview(135,20)向左转|向右转