Convert local to global coordinates
gCoord = local2globalcoord(lclCoord,OPTION)
gCoord = local2globalcoord(___,localOrigin)
gCoord = local2globalcoord(___,localAxes)
returns
the global coordinate gCoord
= local2globalcoord(lclCoord
,OPTION
)gCoord
corresponding to
the local coordinate lclCoord
. OPTION
determines
the type of localtoglobal coordinate transformation.
specifies
the origin of the local coordinate system.gCoord
= local2globalcoord(___,localOrigin
)
specifies
the axes of the local coordinate system.gCoord
= local2globalcoord(___,localAxes
)

Local coordinates in rectangular or spherical coordinate form. If the coordinates are in rectangular form, the column represents (X,Y,Z) in meters. If the coordinates are in spherical form, the column represents (az,el,r). az is the azimuth angle in degrees, el is the elevation angle in degrees, and r is the radius in meters.  

Types of coordinate transformations. Valid values are
 

Origin of local coordinate system. Default:  

Axes of local coordinate system. Default: 

Global coordinates in rectangular or spherical coordinate form. The origin of the global coordinate system is at [0; 0; 0]. That system's axes are the standard unit basis vectors in threedimensional space, [1; 0; 0], [0; 1; 0], and [0; 0; 1]. 
Convert between local and global coordinate in rectangular form.
gCoord = local2globalcoord([0; 1; 0], ... 'rr',[1; 1; 1]); % Local origin is at [1; 1; 1] % gCoord = [1 1 1]+[0 1 0];
Convert local spherical coordinate to global rectangular coordinate.
gCoord = local2globalcoord([30; 45; 4],'sr'); % 30 degree azimuth, 45 degree elevation, 4 meter radius
[1] Foley, J. D., A. van Dam, S. K. Feiner, and J. F. Hughes. Computer Graphics: Principles and Practice in C, 2nd Ed. Reading, MA: AddisonWesley, 1995.
azel2phitheta
 azel2uv
 global2localcoord
 phitheta2azel
 uv2azel