MATRIX2QUATERNION
Name
MATRIX2QUATERNION
Purpose
Transforms a rotation matrix into a quaternion.
Category
Math
Calling Sequence
Result = MATRIX2QUATERNION(Rotmatrix)
Inputs
Rotmatrix: A 3x3 rotation matrix.
Outputs
The function returns the quaternion corresponding to the rotation
specified by the rotation matrix.
Example
IDL> theta=!PI/3.
IDL> rm = [[COS(theta),0,-SIN(theta)],[0,1,0],[SIN(theta),0,COS(theta)]]
IDL> quat = MATRIX2QUATERNION(rm)
IDL> PRINT, quat
0.00000 -0.50000 0.00000 0.866025
Modification History
Written by: Jeremy Bailin
27 Nov 2008 Released in JBIU