ezsurf((x.^2+y.^2<=1).(z=1.-(x.^2+y.^2))+((x.^2+y.^2<=1).0))即可。
ezsurf((x.^2+y.^2<=1).(z=1.-(x.^2+y.^2))+((x.^2+y.^2<=1).0))即可。

这样写试试:
[x,y]=meshgrid(-1:0.1:1);
z=x.^2 + y.^2;
i=find(z<=1);
z(i)=1-z(i);
i=find(z>1);
z(i)=0;
mesh(x,y,z)

