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.

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

88.89% Correct | 11.11% Incorrect
Last solution submitted on Jan 07, 2019

Recent Solvers4

Suggested Problems

More from this Author2

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!