Main Content

tform2axang

Convert homogeneous transformation to axis-angle rotation

Description

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

example

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×4

    1.0000         0         0    1.5708

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

Rotation given in axis-angle form, specified as an n-by-4 matrix of n axis-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

|