Main Content

transform

Apply rigid body transformation to points

    Description

    tpoints = transform(transformation,points) applies the rigid body transformation transformation to the input points points, and returns the transformed points tpoints.

    tpoints = transform(___,isCol=format) sets the expected format of the input points points to be either column-wise or row-wise by using the logical flag format in addition to the input arguments from the previous syntax.

    Input Arguments

    collapse all

    Transformation, specified as an se2, se3, so2, or so3 object, or as an M-element array of transformation objects. M is the total number of transformations.

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

    Data Types: single | double

    Points to transform, specified as an N-by-D-by-M array, where:

    • D is the dimension of the transformation, defined as 2 for 2-D transformations and 3 for 3-D transformations.

    • N is the total number of input points to transform.

    • M is the total number of transforms to perform on each point.

    For 2-D transformations, each row specifies a point in the form [X Y]. For 3-D transformations, each row specifies a point in the form [X Y Z].

    If you specify format as true, then you must specify points as a D-by-N-by-M array, where each column specifies a point.

    Data Types: single | double

    Point format, specified as a logical 0 (false) or 1 (true). If you specify this argument as true, you must specify the points in points as columns. Otherwise, specify points as rows.

    Example: isCol=true

    Data Types: logical

    Output Arguments

    collapse all

    Transformed points, returned as an N-by-D-by-M array, where:

    • D is the dimension of the transformation, defined as 2 for 2-D transformations and 3 for 3-D transformations.

    • N is the total number of input points to transform.

    • M is the total number of transforms to perform on each point.

    For 2-D transformations, each row specifies a point in the form [X Y]. For 3-D transformations, each row specifies a point in the form [X Y Z].

    If you specify format as true, tpoints is returned as a D-by-N-by-M array, where each column specifies a point.

    Extended Capabilities

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

    Version History

    Introduced in R2022b

    See Also

    Functions

    Objects