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 rotation used in this function is a passive transformation between two coordinate systems.

[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.

Introduced in R2017a