dtw2

DTW (dynamic time warping) with local paths of 0, 45, and 90 degrees

Contents

Syntax

Description

dtw2(vec1, vec2, beginCorner, endCorner, plotOpt, distanceBound) returns the DTW distance between vec1 and vec2, assuming a local path constrains of 0, 45, and 90 degrees.

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

Note that this function is called by dtw.

Example

vec1=[71 73 75 80 80 80 78 76 75 73 71 71 71 73 75 76 76 68 76 76 75 73 71 70 70 69 68 68 72 74 78 79 80 80 78];
vec2=[69 69 73 75 79 80 79 78 76 73 72 71 70 70 69 69 69 71 73 75 76 76 76 76 76 75 73 71 70 70 71 73 75 80 80 80 78];
[minDist, dtwPath, dtwTable] = dtw2(vec1, vec2);
dtwPathPlot(vec1, vec2, dtwPath);

See Also

dtwPathPlot, dtwBridgePlot, dtw1, dtw2m, dtw3.


Top page   Next: dtw1m.m   Prev:dtw2m.m