% mat-vec mult
n=input('n =');
x=rand(n,1);
A=rand(n);
b=zeros(n,1);
tic;
for i=1:n
  for j=1:n
    b(i)= b(i)+A(i,j)*x(j);
  end
end
toc
tic
b2=A*x;
toc
