主要内容

rotationMatrix

R2026b

Class: simscape.multibody.Transformation
Namespace: simscape.multibody

Extract rotation matrix from transformation

Since R2026b

Description

R = rotationMatrix(t) extracts the 3-by-3 rotation matrix from the rotation of the specified transformation.

example

Input Arguments

expand all

Transformation, specified as a simscape.multibody.Transformation object.

Output Arguments

expand all

Rotation matrix that maps directions from the follower frame to the base frame, returned as a 3-by-3 orthonormal double matrix with determinant +1.

Attributes

Accesspublic

To learn about attributes of methods, see Method Attributes.

Examples

expand all

Extract the rotation matrix from a simscape.multibody.Transformation object.

Create a rotation of 90 deg about the z-axis and convert it to a transformation.

rot = simscape.multibody.StandardAxisRotation(simscape.Value(90,"deg"),"+Z");
t = transformation(rot);

Extract the 3-by-3 rotation matrix from the transformation.

R = rotationMatrix(t)
R = 3x3 double
    0.0000   -1.0000         0
    1.0000    0.0000         0
         0         0    1.0000

Version History

Introduced in R2026b