a=[1,2,3,4,5,6,7];
n=length(a)
sum=0
for i =1:n
sum=sum+a(i)
end
disp(['sum=',num2str(sum)])

