Main Content

trvec

Extract translation vector

Since R2022b

    Description

    translationVector = trvec(transformation) extracts the translation vector translationVector of the SE(2) or SE(3) transformation transformation.

    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.

    Output Arguments

    collapse all

    Translation vector, returned as an N-by-2 matrix for se2 objects or an N-by-3 matrix for se3 objects. N is the total number of transformations or rotations, and each row is a translation vector in the form [X Y] for 2-D transformations or [X Y Z] for 3-D transformations.

    Extended Capabilities

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

    Version History

    Introduced in R2022b

    See Also

    Functions

    Objects