📜  MATLAB 3D ellipsoid()

📅  最后修改于: 2021-01-07 03:02:19             🧑  作者: Mango

MATLAB ellipsoid()

它生成一个椭球函数。

句法

[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr,n) // It creates three n+1-by-n+1 matrices so that surf(x,y,z) develop an ellipsoid with center (xc,yc,zc) and radii (xr,yr,zr).
[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr) // It uses n = 20.
ellipsoid(...) // with no output argument graphs the ellipsoid as a surface.

cx=0;cy=0;cz=0;
rx=1;ry=2;rz=0.5;
ellipsoid(cx,cy,cz,rx,ry,rz)
axis('equal')

输出: