Main Content


Convert Euler-Rodrigues vector to rotation angles



[R1 R2 R3]=rod2angle(rod) function calculates the set of rotation angles, R1, R2, and R3, for a given Euler-Rodrigues (also known as Rodrigues) vector, rod. The Rodrigues angles represent a passive transformation from frame A to frame B. The resulting rotation angles represent a series of right-hand intrinsic passive rotations from frame A to frame B.

[R1 R2 R3]=rod2angle(rod,S) function calculates the set of rotation angles for a given Rodrigues vector and a specified rotation sequence, S.


collapse all

Determine rotation angles from vector, [.1 .2 -.1].

r = [.1 .2 -.1];
[yaw, pitch, roll] = rod2angle(r)
yaw =


pitch =


roll =


Input Arguments

collapse all

M-by-3 matrix containing M Rodrigues vector.

Data Types: double

Rotation angles, in radians, from which to determine Rodrigues vector. For the default rotation sequence, ZYX, the rotation angle order is:

  • R1 — z-axis rotation

  • R2 — y-axis rotation

  • R3 — x-axis rotation

Data Types: char | string

Output Arguments

collapse all

M-by-1 array of first rotation angles, in radians.

M-by-1 array of second rotation angles, in radians.

M-by-1 array of third rotation angles, in radians.


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:




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.


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

Version History

Introduced in R2017a