Difference between revisions of "Anax2quat.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Update function See also links and function index membership)
 
(6 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
     q=anax2quat(rot_axis,rot_angle)
 
     q=anax2quat(rot_axis,rot_angle)
  
==Arguments==
+
==Parameters==
  
 
     rot_axis -  cartesian direction vector given as a
 
     rot_axis -  cartesian direction vector given as a
 
                 row or column with three real elements
 
                 row or column with three real elements
 
+
 
     rot_angle - rotation angle in radians
 
     rot_angle - rotation angle in radians
 
  
 
==Outputs==
 
==Outputs==
Line 21: Line 20:
  
 
==Notes==
 
==Notes==
Both angle-axis and quaternion convention are numerically stable. This conversion has no singularities.
+
Both angle-axis and quaternion convention are numerically stable. This conversion has no singularities. See the notes on [[rotation conventions]] for the basic definitions of rotations in ''Spinach''.
  
 
==See also==
 
==See also==
[[euler2dcm.m]], [[dcm2euler.m]], [[euler2wigner.m]], [[dcm2wigner.m]]
+
[[euler2dcm.m]], [[dcm2euler.m]], [[wigner.m]], [[dcm2wigner.m]], [[anax2dcm.m]], [[axis_tsymm.m]], [[euler_sup.m]], [[quat2anax.m]], [[rotmat_align.m]], [[rotor_stack.m]], [[xyz2sph.m]], [[Kernel_utilities]]
 
 
  
 
''Version 2.3, authors: [[Gareth Charnock]], [[Ilya Kuprov]]''
 
''Version 2.3, authors: [[Gareth Charnock]], [[Ilya Kuprov]]''

Latest revision as of 19:34, 6 June 2026

Converts angle-axis rotation parameters into a quaternion.

Syntax

    q=anax2quat(rot_axis,rot_angle)

Parameters

    rot_axis -  cartesian direction vector given as a
                row or column with three real elements

    rot_angle - rotation angle in radians

Outputs

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

Notes

Both angle-axis and quaternion convention are numerically stable. This conversion has no singularities. See the notes on rotation conventions for the basic definitions of rotations in Spinach.

See also

euler2dcm.m, dcm2euler.m, wigner.m, dcm2wigner.m, anax2dcm.m, axis_tsymm.m, euler_sup.m, quat2anax.m, rotmat_align.m, rotor_stack.m, xyz2sph.m, Kernel_utilities

Version 2.3, authors: Gareth Charnock, Ilya Kuprov