clc;clear;close all;

file = input('Enter name of wav file  ', 's');

counter = 0;


    
    for test_number2 = 0:9
        for test_number3 = 1:4
            counter = counter + 1;
            file2 = sprintf('%d_%d.wav',test_number2, test_number3);
            test_energy = energy_per_frame(file);
            test_against = energy_per_frame(file2);
            distance(counter) = dtw(test_energy,test_against);

        end

    end

[minimum index] = min(distance);
match  = floor(index/4.0);

sprintf('the dectected number is %d',match)
