Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

fliptform

Flip input and output roles of spatial transformation structure

Syntax

tflip = fliptform(T)

Description

example

tflip = fliptform(T) creates a new spatial transformation structure (tform) by flipping the roles of the inputs and outputs in an existing tform struct.

Examples

collapse all

Create a spatial transformation structure (tform).

T = maketform('affine', [.5 0 0; .5 2 0; 0 0 1])
T = 

  struct with fields:

       ndims_in: 2
      ndims_out: 2
    forward_fcn: @fwd_affine
    inverse_fcn: @inv_affine
          tdata: [1×1 struct]

Create a new spatial transformation structure (tform) by flipping the roles of the inputs and outputs.

T2 = fliptform(T)
T2 = 

  struct with fields:

       ndims_in: 2
      ndims_out: 2
    forward_fcn: @inv_affine
    inverse_fcn: @fwd_affine
          tdata: [1×1 struct]

After flipping the spatial transformation structures, the following statements are equivalent.

x = tformfwd([-3 7],T)
x = tforminv([-3 7],T2)
x =

     2    14


x =

     2    14

Input Arguments

collapse all

Spatial transformation, specified as a structure (tform).

Data Types: struct

Output Arguments

collapse all

Flipped spatial transformation, returned as a structure (tform).

See Also

|

Introduced before R2006a

Was this topic helpful?