<< CL_rot_matrix2angles Coordinates and frames CL_rot_quat2angles >>

CelestLab >> Coordinates and frames > CL_rot_matrix2quat

CL_rot_matrix2quat

Transformation matrix to quaternion

Calling Sequence

[q]=CL_rot_matrix2quat(M)

Description

Parameters

M :

Transformation matrix (3x3xN)

q :

Quaternion (dim N)

Authors

Bibliography

See also

Examples

ang = CL_deg2rad(10);
M = CL_rot_angles2matrix(3,ang) // rotation around Z axis
q = CL_rot_matrix2quat(M)
M2 = CL_rot_quat2matrix(q)    //same as M1
<< CL_rot_matrix2angles Coordinates and frames CL_rot_quat2angles >>