Quat2anax.m

From Spinach Documentation Wiki
Revision as of 16:59, 2 November 2015 by Admin (talk | contribs) (Created page with "Converts a quaternion into angle-axis rotation parameters. Syntax: [rot_axis,rot_angle]=quat2anax(q) where q is a structure with four fields q.u, q.i, q.j, ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Converts a quaternion into angle-axis rotation parameters. Syntax:

                [rot_axis,rot_angle]=quat2anax(q)

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

   rot_axis - cartesian direction vector given as a row or column 
              with three real elements
  rot_angle - rotation angle in radians