To perform the transformation of points induced by a matrix in Matlab, you can follow these steps:
Define the input point as a column vector.
Define the transformation matrix.
Multiply the transformation matrix by the point vector.
Extract the transformed point vector from the result of the multiplication.
Here's an example Matlab code that performs a translation followed by a rotation transformation:
main.m666 chars24 lines
This code performs a translation of (2, 3) followed by a rotation of 45 degrees around the origin, and transforms the input point (1, 2) to the output point (3.1213, 3.5355).
gistlibby LogSnag