% this file creates a matrix with each sound vector in a row. it then mdwt each row, store it in another matrix, finally return a vector with the average of the coeff's.

% run adj_five.m before running this prog

temp1(1,:) = O5_1';
temp1(2,:) = O5_2';
temp1(3,:) = O5_3';
temp1(4,:) = M5_1';
temp1(5,:) = M5_2';
temp1(6,:) = M5_3';
temp1(7,:) = N5_1';
temp1(8,:) = N5_2';
temp1(9,:) = N5_3';
temp1(10,:) = J5_1';
temp1(11,:) = J5_2';
temp1(12,:) = J5_3';
temp1(13,:) = B5_1';
temp1(14,:) = B5_2';
temp1(15,:) = B5_3';
temp1(16,:) = E5_1';
temp1(17,:) = E5_2';
temp1(18,:) = E5_3';
temp1(19,:) = S5_1';
temp1(20,:) = S5_2';
temp1(21,:) = S5_3';
% insert more here

h=daubcqf(le,'min');

% Delete the sound input files to save space
clear O5* M5* N5* J5* B5* E5* S5*;

for(i = 1: size(temp1,1))
	[temp1(i,:), L] = mdwt(temp1(i,:), h, L); 
	%temp1(i,1:3) = zeros(1,1:3);
        %temp1(i,:) = temp1(i,:)/max(temp1(i,:));
end

FIVE = mean(temp1);

% if you want to see the template

%figure
%plot(FIVE)
%title('FIVE')

