dcm2angle
Create rotation angles from direction cosine matrix
Syntax
Description
Basic Syntax
[
calculates the rotation angles, rotationAng1 rotationAng2 rotationAng3] = dcm2angle(dcm)rotationAng1,
rotationAng2, rotationAng3, for a direction cosine
matrix, dcm, using the default rotation sequence of
'ZYX' (yaw, pitch, roll). The direction cosine matrix represents 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.
[
calculates the rotation angles for a specified rotation sequence,
rotationAng1 rotationAng2 rotationAng3] = dcm2angle(dcm,rotationSequence)rotationSequence. The rotation sequence parameter also specifies
the order of the three rotation angles. For example, if
rotationSequence has a value of XYZ, the output
rotation angles are in the order x-y-z (roll, pitch, yaw).
Constraint, Action, and Tolerance Syntax
[
calculates the rotation angles for a specified angle constraint, rotationAng1 rotationAng2 rotationAng3] = dcm2angle(dcm,rotationSequence,lim)lim.
Specify lim after all other input arguments.
[
calculates the rotation angles and performs an action if the direction cosine matrix is
not orthogonal. Specify rotationAng1 rotationAng2 rotationAng3] = dcm2angle(dcm,rotationSequence,lim,action)action after all other input arguments.
[
calculates the rotation angles and uses a rotationAng1 rotationAng2 rotationAng3] = dcm2angle(dcm,rotationSequence,lim,action,tolerance)tolerance level to evaluate
if the direction cosine matrix is orthogonal. Specify tolerance after
all other input arguments.
Examples
Input Arguments
Output Arguments
Limitations
The
'Default'limitations for the'ZYX','ZXY','YXZ','YZX','XYZ', and'XZY'implementations generate anrotationAng2angle that lies between ±90 degrees, androtationAng1androtationAng3angles that lie between ±180 degrees.The
'Default'limitations for the'ZYZ','ZXZ','YXY','YZY','XYX', and'XZX'implementations generate arotationAng2angle that lies between 0–180 degrees, androtationAng1androtationAng3angles that lie between ±180 degrees.The
'ZeroR3'limitations for the'ZYX','ZXY','YXZ','YZX','XYZ', and'XZY'implementations generate arotationAng2angle that lies between ±90 degrees, androtationAng1androtationAng3angles that lie between ±180 degrees. However, whenrotationAng2is ±90 degrees,rotationAng3is set to 0 degrees.The
'ZeroR3'limitations for the'ZYZ','ZXZ','YXY','YZY','XYX', and'XZX'implementations generate arotationAng2angle that lies between 0–180 degrees, androtationAng1androtationAng3angles that lie between ±180 degrees. However, whenrotationAng2is 0 or ±180 degrees,rotationAng3is set to 0 degrees.
Version History
Introduced in R2006bSee Also
angle2dcm | dcmbody2stability | dcm2quat | quat2dcm | quat2angle