load('sequences.mat');
dist = dtw(sequences(1,:),sequences(2,:),3)
figure(1);
hold on;
plot(sequences(1,:),'r');
plot(sequences(2,:),'b');
plot(sequences(3,:),'g');
hold off;

K = dtw_kernel(sequences,sequences,3,1);