for i=1:500
for j=1:2000
A{i,j}=26+((-1)+2*rand(1));
end
end
for i=1:500
J{i}=(sum(A{i,1}))/2000;
end
for i=1:500
for j=1:2000
S{i}=sqrt(sum((A{i,j}-J{i}).^2)/2000);
end
M{i}=1/((sum(1/(S{i}^2)))*((S{i}^2)));
end
for i=1:500
for j=1:2000
TM(j)=sum(M{i}*A{i,j});
end
end