Main Content

rotm

Extract rotation matrix

Since R2022b

    Description

    rotationMatrix = rotm(transformation) returns the rotation matrix rotationMatrix from the SE(2) or SE(3) transformation transformation.

    rotationMatrix = rotm(rotation) returns the rotation matrix rotationMatrix from the SO(2) or SO(3) rotation rotation.

    Input Arguments

    collapse all

    Transformation, specified as a scalar se2 object, a scalar se3 object, or an N-element array of transformation objects. N is the total number of transformations.

    If you specify transformation as an array, each element must be of the same type.

    Rotation, specified as a scalar so2 object, a scalar so3 object, or as an N-element array of rotation objects. N is the total number of rotations.

    If you specify rotation as an array, each element must be of the same type.

    Output Arguments

    collapse all

    Rotation matrix, returned as a 2-by-2-by-N array for 2-D transformations or a 3-by-3-by-N array for 3-D transformations. N is the total number of transformations.

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2022b

    See Also

    Functions

    Objects