Main Content


(Not recommended) 3-D rigid geometric transformation using postmultiply convention

Since R2020a

rigid3d is not recommended. Use the rigidtform3d object instead. For more information, see Compatibility Considerations.


A rigid3d object stores information about a 3-D rigid geometric transformation and enables forward and inverse transformations.



tform = rigid3d creates a default rigid3d object that corresponds to an identity transformation.

tform = rigid3d(t) sets the T property as the specified 3-D rigid transformation matrix t.


tform = rigid3d(rot,trans) sets the Rotation and Translation properties as the specified rotation matrix rot and translation vector trans, respectively.


expand all

Forward rigid transformation, specified as a 4-by-4 numeric matrix. This matrix must be a homogeneous transformation matrix that satisfies the postmultiply convention given by:


T has the form


Data Types: single | double

Rotation component of the transformation, specified as a 3-by-3 numeric matrix. This rotation matrix satisfies the postmultiply convention given by:


Data Types: single | double

Translation component of the transformation, specified as a 3-element numeric row vector. This translation vector satisfies the convention given by


Data Types: single | double

This property is read-only.

Dimensionality of the geometric transformation, specified as the value 3.

Object Functions

invertInvert geometric transformation
outputLimitsFind output spatial limits given input spatial limits
transformPointsForwardApply forward geometric transformation
transformPointsInverseApply inverse geometric transformation


collapse all

Specify an angle of rotation in degrees and create a 3-by-3 rotation matrix.

theta = 30;
rot = [ cosd(theta) sind(theta) 0; ...
       -sind(theta) cosd(theta) 0; ...
       0 0 1];

Specify the amount of horizontal, vertical, and depthwise translation, respectively.

trans = [2 3 4];

Create a rigid3d object that performs the rotation and translation.

tform = rigid3d(rot,trans)
tform = 
  rigid3d with properties:

       Rotation: [3x3 double]
    Translation: [2 3 4]

Extended Capabilities

Version History

Introduced in R2020a

expand all