Problem 43478. Calculate the dynamic time warping similarity
Dynamic time warping (DTW) is an algorithm for measuring the similarity between two time series that may have been acquired at different speeds. DTW aims to find an optimal match between two time series, such that the sum of the Euclidean distances between matching points is minimal.
![](https://upload.wikimedia.org/wikipedia/commons/a/ab/Dynamic_time_warping.png)
Image courtesy of Wikipedia.
The image illustrates the DTW solution for two time series (which have been shifted vertically for better visualization). The dotted lines indicate matches between points of each series, and in order to represent a valid time warp they should never cross.
Pseudocode for the DTW algorithm can be found at its Wikipedia entry.
Given two time series, calculate the dynamic time warping similarity between them.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers5
Suggested Problems
-
Determine whether a vector is monotonically increasing
20128 Solvers
-
17869 Solvers
-
2893 Solvers
-
Longest run of consecutive numbers
5316 Solvers
-
188 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!