% 10 little indian (id=5) p=[43.9 57.4 58.7 59 59.5 60 60 60.2 60.2 60 60.1 60 59.8 60.3 60.5 60.5 60.3 59.9 60.9 60.4 60.2 60 60.7 82.1 61.2 60.5 60.2 60.4 60.3 60.4 60.4 60.5 60.5 60.3 59.3 60.1 60.4 60.3 60 58.1 66.4 61.4 60.8 60.4 60.7 61.3 65.7 65.7 65.6 65.4 65.2 65 65 65.2 65.2 65.3 65.7 67.5 68 68.2 67.8 67.8 69.5 68.5 68.4 68.3 68 67.6 66.9 66.3 66.3 65.9 65.5 65 64.4 64.7 64.8 64.9 64.9 64.5 63.6 61.7 60.2 60 60.4 60.8 61.2 61.7 62 62.1 66.6 63.7 63.6 63.4 63.3 63.3 63.3 63.4 63.3 63.3 63.1 62.9 62.6 63.2 63.2 63.2 62.8 64.7 63.9 63.3 63.2 63.5 62.8 64.1 63.7 63.5 63.5 63.5 63.5 63.5 63.4 63 61.7 62 62.8 63.7 63.4 63.5 63.2 63.6 64.6 64.2 63.9 63.7 63.2 61.3 59.6 59.4 59.7 59.6 59.9 60.3 61.2 62.7 63.2 63.2 63.4 67.7 64.5 64 63.6 63.4 63.4 63.3 62.5 61.1 60.5 59.9 60.2 60 59 59.8 60.2 60 60.2 60 59.1 57.6 57 57.2 83 60.7 60 60.2 60.3 60.1 60.2 61 61 60.8 60.5 60.6 60.7 61 60.6 60.2 60.2 59.3 61.4 60.9 60.5 60.2 60.3 60.2 59.7 59.5 60.2 60.3 60 59.9 59.8 60.2 60 60.4 60.8]; q=[60 60 60 60 60 60 64 67 67 64 64 60 62 62 62 62 62 62 59 62 62 59 59 55 60 60 60 60 60 60 64 67 67 64 64 60 67 65 65 64 64 62 60]; showPlot=1; figure; [minDist, dpPath]=myPvAlignSP(p, q, showPlot); return % If you want to do playback, download SAP toolbox at http://mirlab.org/jang/matlab/toolbox/sap and proceed as follows. addpath d:/users/jang/matlab/toolbox/sap % You need to change this to add SAP toolbox to the search path. % Play back of the oringal note note=[60 26 60 13 60 13 60 26 60 13 60 13 64 26 67 13 67 13 64 13 64 13 60 26 62 26 62 13 62 13 62 26 62 13 62 13 59 26 62 13 62 13 59 13 59 13 55 26 60 26 60 13 60 13 60 26 60 13 60 13 64 26 67 13 67 13 64 13 64 13 60 26 67 26 65 13 65 13 64 13 64 13 62 26 60 26]; notePlay(note); % Playback of the singing pitch vector pvPlay(p); % Playback of the induced singing pitch vector pvPlay(inducedP);