将下面语句保存为tu.m,在窗口中输入tu看看效果,x=0:0.05:2;y=x';[X Y]=meshgrid(x,y);Z=sqrt(16-3*X.^2-Y.^2);surf(Z)
利用椭圆的参数方程theta=0:0.1:2*pi;phi=theta';x=4/sqrt(3)*cos(phi)*cos(theta);y=4*cos(phi)*sin(theta);z=4*sin(phi)*ones(size(theta));mesh(x,y,z)