dtw4durationAlignment

Pure m-file implementation of DTW (dynamic time warping) for duration alignment

Contents

Syntax

Description

dtw1m(vec1, vec2, plotOpt) returns the DTW distance between vec1 and vec2, assuming a local path constrains of 27, 45, and 63 degrees.

[minDist, dtwPath, dtwTable] = dtw1m(...) also return two extra results:

Note that this function is a pure m-file implementation which is slow but easy to customize.

Example

vec1=[2 3 1 2 4 1 3 2 3];
vec2=[1 1 4 1 2 2 4 5];
[minDist, dtwPath, dtwTable] = dtw4durationAlignment(vec1, vec2);
dtwPathPlot(vec1, vec2, dtwPath);

See Also

dtwPathPlot, dtwBridgePlot, dtw1, dtw2, dtw3.


Top page   Next: dtw3withRestM.m   Prev:dtwBridgePlot.m