clear all
tic 
x=rand(10000,1);
s=sum(x);
toc
tic
s=0;
for i=1:10000
c(i)=rand(1);
s=s+c(i);
end
toc
