quat2rod

Convert quaternion to Euler-Rodrigues vector

Description

example

rod=quat2rod(quat) function calculates the Euler-Rodrigues vector, rod, for a given quaternion quat.

Examples

collapse all

Determine the Euler-Rodrigues vector from the quaternion.

q = [-0.7071 0 0.7071 0]
r = quat2rod( q )
q =

   -0.7071         0    0.7071         0
r =

         0   -1.0000         0

Input Arguments

collapse all

M-by-4 array of quaternions. quat has its scalar number as the first column.

Data Types: double

Output Arguments

collapse all

M-by-3 matrix containing M Euler-Rodrigues vectors.

Algorithms

An Euler-Rodrigues vector b represents a rotation by integrating a direction cosine of a rotation axis with the tangent of half the rotation angle as follows:

b=[bxbybz]

where:

bx=tan(12θ)sx,by=tan(12θ)sy,bz=tan(12θ)sz

are the Rodrigues parameters. Vector s represents a unit vector around which the rotation is performed. Due to the tangent, the rotation vector is indeterminate when the rotation angle equals ±pi radians or ±180 deg. Values can be negative or positive.

References

[1] Dai, J.S. "Euler-Rodrigues formula variations, quaternion conjugation and intrinsic connections." Mechanism and Machine Theory, 92, 144-152. Elsevier, 2015.

Introduced in R2017a