Main Content

axang2tform

Convert axis-angle rotation to homogeneous transformation

Description

example

tform= axang2tform(axang)converts a rotation given in axis-angle form,axang, to a homogeneous transformation matrix,tform. When using the transformation matrix, premultiply it with the coordinates to be transformed (as opposed to postmultiplying).

Examples

collapse all

axang = [1 0 0 pi/2]; tform = axang2tform(axang)
tform =4×41.0000 0 0 0 0 0.0000 -1.0000 0 0 1.0000 0.0000 0 0 0 0 1.0000

Input Arguments

collapse all

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

Example:[1 0 0 pi/2]

Output Arguments

collapse all

Homogeneous transformation matrix, specified by a 4-by-4-by-nmatrix ofnhomogeneous transformations. When using the transformation matrix, premultiply it with the coordinates to be formed (as opposed to postmultiplying).

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

Extended Capabilities

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

See Also

Introduced in R2015a