Main Content

tform2axang

Convert homogeneous transformation to axis-angle rotation

Description

example

axang= tform2axang(tform)converts the rotational component of a homogeneous transformation,tform, to an axis-angle rotation,axang. The translational components oftformare ignored. The input homogeneous transformation must be in the premultiply form for transformations.

Examples

collapse all

tform = [1 0 0 0; 0 0 -1 0; 0 1 0 0; 0 0 0 1]; axang = tform2axang(tform)
axang =1×41.0000 0 0 1.5708

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

Rotation given in axis-angle form, specified as ann4矩阵ofnaxis-angle rotations. The first three elements of every row specify the rotation axes, and the last element defines the rotation angle (in radians).

Example:[1 0 0 pi/2]

Extended Capabilities

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

Version History

Introduced in R2015a

See Also