"does you code have section that can shrink and expand?"
LOL, no the code does not shrink or expand.. the code is stable.. but what is does: yes, it find the optimum alignment between two vectors of possible dissimilar length.. it real DTWarping published by Eamonn Keogh.
let me find the code first .. and mail me at tschrama@fsw.leidenuniv.nl
Best regards,
Thijs Schrama