function result1=Quadratic_dis(edgehistogram,my_size)
result1=0;

result=0;

for i=3:my_size
    
    for j=3:i-1
       for m=1:length(edgehistogram{i})
           for n=1:length(edgehistogram{j})
    A(m,n)= edgehistogram{i}(m)-edgehistogram{j}(n);
           end
       end
       A=1-A/max(max(A));
        result(i,j)=sqrt((edgehistogram{i}-edgehistogram{j})*A*(edgehistogram{i}-edgehistogram{j})');
    end
    for j=i+1:my_size
       for m=1:length(edgehistogram{i})
           for n=1:length(edgehistogram{j})
    A(m,n)= edgehistogram{i}(m)-edgehistogram{j}(n);
           end
       end
       A=1-A/max(max(A));
        result(i,j)=sqrt((edgehistogram{i}-edgehistogram{j})*A*(edgehistogram{i}-edgehistogram{j})');
    end
end

result1=result;
