# normalize

Normalize transformation matrix

## Syntax

``transformationN = normalize(transformation)``
``transformationN = normalize(transformation,Method=normMethod)``

## 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. NoteThe transformation objects do not automatically normalize their rotations. You must use `normalize` each time you need to normalize a transformation. You may need to do this if: You specified an unnormalized input transformation at the creation of the transformation object.You performed many operations on the transformation objects such as ```mtimes, *``` (Robotics System Toolbox), which may cause the transformation to become unnormalized due to data type precision. ```
````transformationN = normalize(transformation,Method=normMethod)` specifies the normalization method `normMethod` that the `normalize` function uses to normalize `transformation`.```

## 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`

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 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`, `se3`, `so2`, or `so3` object.

Matrices

## Version History

Introduced in R2022b