Contenu principal

axisAngle

R2026b

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

Extract rotation axis and angle from transformation

Since R2026b

Description

[axis,angle] = axisAngle(t) extracts the rotation axis and angle from the rotation of the specified transformation.

example

Input Arguments

expand all

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

Output Arguments

expand all

Unit vector representing the axis of rotation, returned as a 3-by-1 double array.

Rotation angle about the axis, returned as a simscape.Value object that has a scalar value and angle unit.

Attributes

Accesspublic

To learn about attributes of methods, see Method Attributes.

Examples

expand all

Extract the rotation axis and angle 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)
t =
  Transformation:

       Rotation: [0.7071 0 0 0.7071]
    Translation: [0 0 0] (m)

Extract the rotation axis and angle from the transformation.

[axis,angle] = axisAngle(t)
axis = 3x1 double
     0
     0
     1

angle =
    1.5708 (rad)

Version History

Introduced in R2026b