Convert global to local coordinates
lclCoord = global2localcoord(gCoord, OPTION)
gCoord = global2localcoord(___,localOrigin)
gCoord = global2localcoord(___,localAxes)
converts global coordinates lclCoord
= global2localcoord(gCoord
, OPTION
)gCoord
to local coordinates
lclCoord
. OPTION
determines the type of
globaltolocal coordinate transformation. In this syntax, the global coordinate origin
is located at (0,0,0) and the coordinate axes are the unit vectors in the
x, y, and z
directions.
specifies the origin of the local coordinate system,
gCoord
= global2localcoord(___,localOrigin
)localOrigin
.
specifies the axes of the local coordinate system,
gCoord
= global2localcoord(___,localAxes
)localAxes
.

Global coordinates in rectangular or spherical coordinate, specified as a 3byN matrix. Each column represents one set of global coordinates. If the coordinates are in rectangular form, each column contains the (x,y,z) components. Units are in meters. If the coordinates are in spherical form, each column contains (az,el,r) components. az is the azimuth angle in degrees, el is the elevation angle in degrees, and r is the radius in meters. The origin of the global coordinate system is assumed to be located at (0, 0, 0). The global system axes are the standard unit basis vectors in threedimensional space, (1, 0, 0), (0, 1, 0), and (0, 0, 1).  

Type of coordinate transformation, specified as a character vector. Valid types are
 

Origin of local coordinate system, specified as a
3byN matrix containing the rectangular coordinates
of the local coordinate system origin with respect to the global coordinate
system. N must match the number of columns of
Default:  

Axes of local coordinate system, specified as a
3by3byN array. Each page contains a 3by3 matrix
representing a different local coordinate system axes. The columns of the
3by3 matrices specify the local x,
y, and z axes in rectangular form with
respect to the global coordinate system. However, you can specify
Default: 

Local coordinates in rectangular or spherical coordinate form, returned as a
3byN matrix. The dimensions of

[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.