Convert quaternion to Euler angles (radians)
eulerAngles = euler(quat,rotationSequence,rotationType)
Convert a quaternion frame rotation to Euler angles in radians using the 'ZYX' rotation sequence.
quat = quaternion([0.7071 0.7071 0 0]); eulerAnglesRandians = euler(quat,'ZYX','frame')
eulerAnglesRandians = 1×3 0 0 1.5708
quat— Quaternion to convert to Euler angles
Quaternion to convert to Euler angles, specified as a scalar, vector, matrix, or multidimensional array of quaternions.
rotationSequence— Rotation sequence
Rotation sequence of Euler representation, specified as a character vector or string.
The rotation sequence defines the order of rotations about the axes. For
example, if you specify a rotation sequence of
The first rotation is about the y-axis.
The second rotation is about the new z-axis.
The third rotation is about the new x-axis.
rotationType— Type of rotation
Type of rotation, specified as
In a point rotation, the frame is static and the point moves. In a frame rotation, the point is static and the frame moves. Point rotation and frame rotation define equivalent angular displacements but in opposite directions.
eulerAngles— Euler angle representation (radians)
Euler angle representation in radians, returned as a
N-by-3 matrix. N is the number of
quaternions in the
For each row of
eulerAngles, the first element
corresponds to the first axis in the rotation sequence, the second element
corresponds to the second axis in the rotation sequence, and the third
element corresponds to the third axis in the rotation sequence.
The data type of the Euler angles representation is the same as the
underlying data type of