
% ----------------------------------------------

disp ('c1t - se srovnava s -  c1 c2 c3 c4');
figure(1); soundsc([s1t s1]); D1=dtw (c1, c1t);
figure(2); soundsc([s1t s2]); D2=dtw (c2, c1t);
figure(3); soundsc([s1t s3]); D3=dtw (c3, c1t);
figure(4); soundsc([s1t s4]); D4=dtw (c4, c1t);
[m,mini]=min([D1 D2 D3 D4]); 
disp(sprintf('Rozpoznano ======= %d ========', mini));
pause(3);

disp ('c2t - se srovnava s -  c1 c2 c3 c4');
figure(1); soundsc([s2t s1]); D1=dtw (c1, c2t);
figure(2); soundsc([s2t s2]); D2=dtw (c2, c2t);
figure(3); soundsc([s2t s3]); D3=dtw (c3, c2t);
figure(4); soundsc([s2t s4]); D4=dtw (c4, c2t);
[m,mini]=min([D1 D2 D3 D4]); 
disp(sprintf('Rozpoznano ======= %d ========', mini));
pause(3);


disp ('c3t - se srovnava s -  c1 c2 c3 c4');
figure(1); soundsc([s3t s1]); D1=dtw (c1, c3t);
figure(2); soundsc([s3t s2]); D2=dtw (c2, c3t);
figure(3); soundsc([s3t s3]); D3=dtw (c3, c3t);
figure(4); soundsc([s3t s4]); D4=dtw (c4, c3t);
[m,mini]=min([D1 D2 D3 D4]); 
disp(sprintf('Rozpoznano ======= %d ========', mini));
pause(3);


disp ('c4t - se srovnava s -  c1 c2 c3 c4');
figure(1); soundsc([s4t s1]); D1=dtw (c1, c4t);
figure(2); soundsc([s4t s2]); D2=dtw (c2, c4t);
figure(3); soundsc([s4t s3]); D3=dtw (c3, c4t);
figure(4); soundsc([s4t s4]); D4=dtw (c4, c4t);
[m,mini]=min([D1 D2 D3 D4]); 
disp(sprintf('Rozpoznano ======= %d ========', mini));
pause(3);


disp ('c1l - se srovnava s -  c1 c2 c3 c4');
figure(1); soundsc([s1l s1]); D1=dtw (c1, c1l);
figure(2); soundsc([s1l s2]); D2=dtw (c2, c1l);
figure(3); soundsc([s1l s3]); D3=dtw (c3, c1l);
figure(4); soundsc([s1l s4]); D4=dtw (c4, c1l);
[m,mini]=min([D1 D2 D3 D4]); 
disp(sprintf('Rozpoznano ======= %d ========', mini));
pause(3);


disp ('c2l - se srovnava s -  c1 c2 c3 c4');
figure(1); soundsc([s2l s1]); D1=dtw (c1, c2l);
figure(2); soundsc([s2l s2]); D2=dtw (c2, c2l);
figure(3); soundsc([s2l s3]); D3=dtw (c3, c2l);
figure(4); soundsc([s2l s4]); D4=dtw (c4, c2l);
[m,mini]=min([D1 D2 D3 D4]); 
disp(sprintf('Rozpoznano ======= %d ========', mini));
pause(3);


disp ('cb - se srovnava s -  c1 c2 c3 c4');
figure(1); soundsc([sb s1]); D1=dtw (c1, cb);
figure(2); soundsc([sb s2]); D2=dtw (c2, cb);
figure(3); soundsc([sb s3]); D3=dtw (c3, cb);
figure(4); soundsc([sb s4]); D4=dtw (c4, cb);
[m,mini]=min([D1 D2 D3 D4]); 
disp(sprintf('Rozpoznano ======= %d ========', mini));
pause(3);


disp ('ck - se srovnava s -  c1 c2 c3 c4');
figure(1); soundsc([sk s1]); D1=dtw (c1, ck);
figure(2); soundsc([sk s2]); D2=dtw (c2, ck);
figure(3); soundsc([sk s3]); D3=dtw (c3, ck);
figure(4); soundsc([sk s4]); D4=dtw (c4, ck);
[m,mini]=min([D1 D2 D3 D4]); 
disp(sprintf('Rozpoznano ======= %d ========', mini));
pause(3);
