How to set proper maxsamp value in Dynamic Time Warping (DTW)?

4 views (last 30 days)
I'd like to perform a time-warping of my signals (trajectory information during a movement analysis). The signals correspond to the same movement (they are the trials of the same movement) but they are out-of-phase, in other words, the "events" of the movement occurred at slightly different instances due to subject's movement (the same subject but moved in different speeds). However, when I try to time-warp them to each other I get a result like this:
As you can see, the original signals are somewhat close to each other. The differences caused by patient's different movement velocity and also slight variations of trajectories within trials. When I tried to use dtw without any maxsamp value as in the graph (left it as default aka Inf), the results don't seem very good- especially the saturations at the peaks. Therefore, I probably need to set a proper maxsamp constraint but that time I am loosing from the quality of the alignment.
My question is how do I set a proper maxsamp value to constrain the algorithm in order it to not deviate too much from the diagonal line? Or are they any other techniques that I can follow to align my signals best as possible?
P.S.: If you are kind enough maybe you can answer also my another question on the use of DTW, here in the link.

Answers (0)


Find more on Time Series in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!