StartEndTranslate:
Translate a Trajectory Based on Start and End Points
Description
A function to translate, rotate and scale the points of trajectory2 using trajectory1. The new trajectory will have the same start and end points as trajectory1.
Usage
StartEndTranslate(traj1, traj2)
Arguments
traj1
An m x n matrix containing trajectory1. Here m is the number of points and n is the dimension of the points.
traj2
A k x n matrix containing trajectory2. Here k is the number of points and n is the dimension of the points. The two trajectories are not required to have the same number of points.
Value
An m x n matrix containing the new variation of trajectory2 is returned. Here m is the number of points and n is the dimension of the points.
Details
Every point of trajectory2 is rotated, scaled and translated so that the start and end points of the two trajectories match. The new variation of trajectory2 is returned as a matrix.