A = [1 2 3 4 5 6 7 8 9 10];
sum = 0;

for i=1:10
    sum = sum + A(i)
end

avg = sum/length(A)
disp(avg)