# tform2trvec

Extract translation vector from homogeneous transformation

## Description

example

trvec = tform2trvec(tform) extracts the Cartesian representation of translation vector, trvec , from a homogeneous transformation, tform. The rotational components of tform are ignored. The input homogeneous transformation must be in the premultiply form for transformations.

## Examples

collapse all

tform = [1 0 0 0.5; 0 -1 0 5; 0 0 -1 -1.2; 0 0 0 1];
trvec = tform2trvec(tform)
trvec = 1×3

0.5000    5.0000   -1.2000

## Input Arguments

collapse all

Homogeneous transformation, specified by a 4-by-4-by-n matrix of n homogeneous transformations. The input homogeneous transformation must be in the premultiply form for transformations.

Example: [0 0 1 0; 0 1 0 0; -1 0 0 0; 0 0 0 1]

## Output Arguments

collapse all

Cartesian representation of a translation vector, returned as an n-by-3 matrix containing n translation vectors. Each vector is of the form t = [x y z].

Example: [0.5 6 100]