M-File Help: tr2rt | View code for tr2rt

# tr2rt

Convert homogeneous transform to rotation and translation

[R,t] = tr2rt(TR) splits a homogeneous transformation matrix (NxN) into an orthonormal rotation matrix R (MxM) and a translation vector t (Mx1), where N=M+1.

Works for TR in SE(2) or SE(3)

- If TR is 4x4, then R is 3x3 and T is 3x1.
- If TR is 3x3, then R is 2x2 and T is 2x1.

A homogeneous transform sequence TR (NxNxK) is split into rotation matrix sequence R (MxMxK) and a translation sequence t (KxM).

## Notes

- The validity of R is not checked.

## See also

rt2tr, r2t, t2r

© 1990-2014 Peter Corke.