Rotation Angles to Direction Cosine Matrix

Convert rotation angles to direction cosine matrix


Utilities/Axes Transformations


The Rotation Angles to Direction Cosine Matrix block determines the direction cosine matrix (DCM) from a given set of rotation angles, R1, R2, and R3, respectively the first, second, and third rotation angles. For example, the default rotation angle order ZYX represents a sequence where R1 is z-axis rotation (yaw), R2 is y-axis rotation (pitch), and R3 is x-axis rotation (roll). Use the Rotation Order parameter to change the sequence.

The output is a 3-by-3 DCM that performs coordinate transformations based on rotation angles.


Rotation Order

Specifies the input rotation order for three rotation angles. From the list, select ZYX, ZYZ, ZXY, ZXZ, YXZ, YXY, YZX, YZY, XYZ, XYX, XZY, or XZX. The default is ZYX.

Inputs and Outputs

InputDimension TypeDescription


3-by-1 vectorContains the rotation angles, in radians.
OutputDimension TypeDescription


3-by-3 matrixContains the direction cosine matrix.

Introduced in R2007b