Dcm2quat.m

From Spinach Documentation Wiki
Jump to: navigation, search

Converts a direction cosine matrix representation of a rotation into the unit quaternion representation. Syntax:

                          q=dcm2quat(dcm)

Output: a structure with four fields q.u, q.i, q.j, q.k giving the four components of the quaternion.