mel_filt_norm = [1/5.5, 1/6, 1/6.5, 1/8, 1/9.5, 1/10.5, 1/12, 1/14, 1/16, 1/18.5];
i1=[39.06	76.8	138.34	143.58	180.87	90	67.1	110.37	169.18	246.4];
i2=[27.88	47.77	112.13	209.57	146.74	171.64	123.95	95.15	185.62	260];
i3=[26.39	44.73	78.93	221.48	156.61	184.84	83.24	88.84	177.15	196.78];
i4=[14.08	27.2	62.24	125.22	115.2	108	45.33	48.87	48.19	122.28];
i5=[38.85	40.37	69.41	190.32	171.95	180.18	133.72	98.09	151.45	209.58];
sound_array_i=[i1; i2; i3; i4; i5];
n_i=[];
Rank_table_i=[];
%the for loop to get the normalized data of e and the ranking table of each
%row
for n=1:5
        t=sound_array_i(n,:).*mel_filt_norm;
        n_i=[n_i;t];
        g=n_i(n,:);
        [B,I]=sort(g);
        Rank_table_i=[Rank_table_i;I];
end

%the standard array
I_a=[4 5 1 2 6 7 9 3 8 10];
I_e=[1 3 2 7 4 6 8 5 9 10];
I_r=[8 6 7 1 9 2 10 5 3 4];
I_i=[1 8 7 2 9 10 3 6 5 4];
I_o=[7 8 1 4 6 9 2 5 10 3];
I_l=[1 4 5 6 8 7 9 2 3 10];
I_standard=[I_a;I_e;I_i;I_o;I_l;I_r];
%try to compute the square root of the different data;
%seems to be reliable now.
diff_i=0;
diff_array_i=[];
diff_table_i=[];
for l=1:6
    m=I_standard(l,:);
    for k=1:5;
        for i=1:10;
            for j= 1:10;
                if Rank_table_i(k,j)==m(i)
                    diff_i=diff_i+(i-j)^2;
                end
            end
        end
        diff_array_i=[diff_array_i diff_i];
        diff_i=0;
    end
    diff_table_i=[diff_table_i;diff_array_i];
    diff_array_i=[];
end