MATLAB Function Reference Previous page   Next Page
makehgtform

Create 4-by-4 transform matrix

Syntax

Description

Use makehgtform to create transform matrices for translation, scaling, and rotation of graphics objects. Apply the transform to graphics objects by assigning the transform to the Matrix property of a parent hgtransform object. See Examples for more information.

M = makehgtform returns an identity transform.

M = makehgtform('translate',[tx ty tz]) or M = makehgtform('translate',tx,ty,tz) returns a transform that translates along the x-axis by tx, along the y-axis by ty, and along the z-axis by tz.

M = makehgtform('scale',s) returns a transform that scales uniformly along the x-, y-, and z-axes.

M = makehgtform('scale',[sx,sy,sz]) returns a transform that scales along the x-axis by sx, along the y-axis by sy, and along the z-axis by sz.

M = makehgtform('xrotate',t) returns a transform that rotates around the x-axis by t radians.

M = makehgtform('yrotate',t) returns a transform that rotates around the y-axis by t radians.

M = makehgtform('zrotate',t) returns a transform that rotates around the z-axis by t radians.


Previous page  magic mat2cell Next page

© 1994-2005 The MathWorks, Inc.