max=abs(x(1,1)-x(1,2)); for i=2:b for k=1:a s=abs(x(k,1)-x(k,i)); if s>max max=s; end end end max
for i=2:b for k=1:a y(k,i-1)=(min+0.5*max)/(abs(x(k,1)-x(k,i))+0.5*max); end end e=y'
for m=1:b-1 R(m)=0; for n=1:a R(m)=R(m)+e(m,n) end end
33