Convert Euler-Rodrigues vector to quaternion
Determine the quaternion from Rodrigues vector.
r = [.1 .2 -.1]; q = rod2quat(r)
q = 0.9713 0.0971 0.1943 -0.0971
R— Rodrigues vector
M-by-1 array of Rodrigues vectors.
quat— Rodrigues vector
M-by-4 matrix of M quaternions.
its scalar number as the first column.
An Euler-Rodrigues vector represents a rotation by integrating a direction cosine of a rotation axis with the tangent of half the rotation angle as follows:
are the Rodrigues parameters. Vector 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.
 Dai, J.S. "Euler-Rodrigues formula variations, quaternion conjugation and intrinsic connections." Mechanism and Machine Theory, 92, 144-152. Elsevier, 2015.