FUNCTION REFERENCE

affinetform2d

2-D affine transformation object (premultiply convention, value class).

2-D affine transformation object (premultiply convention, value class).

Syntax

tform = affinetform2d

Syntax

tform = affinetform2d(A)

Syntax

tform = affinetform2d(tformIn)

A is 3-by-3 with last row [0 0 1] (or its 2-by-3 top rows) and maps column points: [x; y; 1] = A*[u; v; 1]. A must be finite and invertible. tformIn may be any 2-D transformation object here; an affine2d object T gives A = T.'. Properties: Dimensionality (2, read-only) and A (settable). Methods: transformPointsForward, transformPointsInverse, invert, outputLimits, isRigid, isSimilarity, isTranslation.

Example

t = affinetform2d([2 0 1; 0 3 2; 0 0 1]); [x, y] = transformPointsForward(t, 1, 1)   % 3, 5

Example

t = affinetform2d([1 0.5 0; 0 1 0]); t.A

Differences from MATLAB: projtform2d, 3-D transformations and single-precision objects are not supported yet. The last row may differ from [0 0 1] by at most 1e-10 (it is then stored exactly).

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.