This app calculates the warping distance of 2 series.
Installation
Download the file Dynamic Time Warping.opx, and then drag-and-drop onto the Origin workspace. An icon will appear in the Apps Gallery window.
Operation
- Activate a worksheet or a matrix sheet and click on the app icon
- Select the two series for input data.
If the input data are two matrices, they must have the same number of columns.
- Set Window Size = 0 to get an exact path. To apply a window, set Window Size to a positive integer.
- Click on the OK button.
Example
To align 2 sequences, you can use the correspondences as index to create the new ones as following.

Note: If you want to output cost matrix, you must call the X-Function by LabTalk and set maxsamp (window size) to 0 and cost to 1. e.g.
dtw -r 2 s1:=1 s2:=2 maxsamp:=0 cost:=1;