Main Content

tform2trvec

提取诠释ion 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 oftformare 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×30.5000 5.0000 -1.2000

Input Arguments

collapse all

Homogeneous transformation, specified by a 4-by-4-by-nmatrix ofnhomogeneous 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 ann3矩阵containingntranslation vectors. Each vector is of the formt= [xyz].

Example:[0.5 6 100]

Extended Capabilities

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

Version History

Introduced in R2015a

See Also