clc;
clear;

A = [0.575
0.064
1.469
1.075
-0.157
-0.023
-0.114
];

P = ones(1,length (A));

pocet1=0;
for k=1:10
vazprum(k) = (A'*P')/sum(P);
pocet=0;
kuk=[];
for i=1:length(A)
v(i)= vazprum(k) - A(i);
if(v(i)==0)
    v(i)=0.001;
end;
if(v(i)>1.136377)
    pocet=pocet+1;
    poradi(pocet)=i;
end;    
      
P(i)= 1/abs(v(i))
vahy(k,i)=P(i);
if(P(i)<0.2)
    pocet1=pocet1/+1;
end; 
opravy(k,i)=v(i); 
end
end  