Main Content

normalize

Normalize transformation or rotation matrix

Since R2022b

    Description

    transformationN = normalize(transformation) normalizes the rotation of the transformation transformation and returns a transformation, transformationN, that is equivalent to transformation, but with normalized rotation.

    rotationN = normalize(rotation) normalizes the rotation of the rotation rotation and returns a rotation, rotationN, that is equivalent to rotation, but with normalized rotation.

    Note

    The transformation and rotation objects do not automatically normalize their rotations. You must use normalize each time you need to normalize a transformation or rotation. You may need to do this if:

    • You specified an unnormalized input transformation or rotation at the creation of the transformation or rotation object.

    • You performed many operations on the transformation or rotation objects such as mtimes, *, which may cause the transformation or rotation to become unnormalized due to data type precision.

    ___ = normalize(___,Method=normMethod) specifies the normalization method normMethod that the normalize function uses to normalize the specified transformation or 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.

    Normalization method, specified as one of these options:

    • "quat" — Convert the rotation submatrix into a normalized quaternion and then convert the normalized quaternion back to a transformation or rotation object. For more information, see the normalize of the quaternion object.

    • "cross" — Normalize the third column of the rotation submatrix and then determine the other two columns through cross products.

    • "svd" — Use singular value decomposition to find the closest orthonormal matrix by setting singular values to 1. This solves the orthogonal Procrustes problem.

    Data Types: char | string

    Output Arguments

    collapse all

    Normalized transformation, returned as an se2 or se3 object.

    Normalized rotation, returned as an so2 or so3 object.

    Extended Capabilities

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

    Version History

    Introduced in R2022b

    See Also

    Functions

    Objects