Convert quaternion to Euler angles (degrees)
Convert a quaternion frame rotation to Euler angles in degrees using the 'ZYX' rotation sequence.
quat = quaternion([0.7071 0.7071 0 0]); eulerAnglesDegrees = eulerd(quat,'ZYX','frame')
eulerAnglesDegrees = 1×3 0 0 90.0000
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 angle 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 (degrees)
Euler angle representation in degrees, returned as a
N-by-3 matrix. N is the number of
quaternions in the
For each row of
eulerAngles, the first column
corresponds to the first axis in the rotation sequence, the second column
corresponds to the second axis in the rotation sequence, and the third
column 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