# Multidimensional dynamic time warping

I am trying to understand how to extend the idea of one dimensional dynamic time warping to the multidimensional case.

Lets assume I have a dataset with two dimensions where TrainA holds dimension 1 and TrainB holds dimension 2. It seems that the simplest case would be

distA = dtw(TrainA)
distB = dtw(TrainB)
dist = distA + distB  // or maybe distA*distB


Is this the right approach? I know there are packages that do this for you but I want to understand what is actually being done.