function res = timeav(l,d)

n = length(l);
r1 = [];
r2 = [];

r1(1) = l(1);

for k = 2:n
    r1 = [r1,r1(k-1)+l(k)];
end

for k = 1:n
    r2(k) = r1(k)/(k*d);
end

res = r2;

end

