Navigation

Operators and Keywords

Function List:

C++ API

sphere.m File Reference


Functions

 if (nargin > 1) print_usage()
 elseif (nargin==1) n
 if (nargout > 0) xx
else surf (h, x, y, z)

Variables

 function [xx, yy, zz]
else n = 20
endif theta = linspace (0, 2*pi, n+1)
 phi = linspace (-pi/2, pi/2, n+1)
 x = meshgrid (theta, phi) cos (phi) .* cos (theta)
 y = cos (phi) .* sin (theta)
 z = sin (phi)
 yy = y
 zz = z

Function Documentation

elseif ( nargin  = =1  ) 

if ( nargout  ,
 
)

if ( nargin  ,
 
)

else surf ( ,
,
,
 
)


Variable Documentation

function[xx, yy, zz]

Initial value:

 sphere (varargin)

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

else n = 20

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

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

x = meshgrid (theta, phi) cos (phi) .* cos (theta)

y = cos (phi) .* sin (theta)

yy = y

z = sin (phi)

zz = z