First version of dtwdnn.m