Navigation

Operators and Keywords

Function List:

C++ API

ellipsoid.m File Reference


Functions

 if (nargin!=6 &&nargin!=7) print_usage()
 if (nargin==6) n
 if (nargout > 0) xx
else surf (h, x, y, z)
endif endfunction!demo !ellipsoid (0, 0, 1, 2, 3, 4, 20)

Variables

 function [xx, yy, zz]
endif xc = varargin{1}
 yc = varargin{2}
 zc = varargin{3}
 xr = varargin{4}
 yr = varargin{5}
 zr = varargin{6}
else n = varargin{7}
endif theta = linspace (0, 2 * pi, n + 1)
 phi = linspace (-pi / 2, pi / 2, n + 1)
 x = meshgrid (theta, phi) xr .* cos (phi) .* cos (theta) + xc
 y = yr .* cos (phi) .* sin (theta) + yc
 z = zr .* sin (phi) + zc
 yy = y
 zz = z

Function Documentation

endif endfunction !demo !ellipsoid ( ,
,
,
,
,
,
20   
)

if ( nargout  ,
 
)

if ( nargin  = =6  ) 

if ( nargin!  = 6 &&nargin!=7  ) 

else surf ( ,
,
,
 
)


Variable Documentation

function[xx, yy, zz]

Initial value:

 ellipsoid (varargin)

  [h, varargin, nargin] = __plt_get_axis_arg__ ((nargout > 0), "ellipsoid", 
                                                varargin{:})

else n = varargin{7}

phi = linspace (-pi / 2, pi / 2, n + 1)

endif theta = linspace (0, 2 * pi, n + 1)

x = meshgrid (theta, phi) xr .* cos (phi) .* cos (theta) + xc

endif xc = varargin{1}

xr = varargin{4}

y = yr .* cos (phi) .* sin (theta) + yc

yc = varargin{2}

yr = varargin{5}

yy = y

z = zr .* sin (phi) + zc

zc = varargin{3}

zr = varargin{6}

zz = z