DTCompareAll function calls DTCompareOne to calculate the DTW distances to avoid having the DTW distance calculation code twice in the source file.
DTCompareAll
DTCompareOne