MATLAB 3D函数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')

【MATLAB 3D函数ellipsoid()】输出
MATLAB 3D函数ellipsoid()

文章图片

    推荐阅读