Implement start coordinate selection for dtw in C++ code.