% Test matrix inverses

n=1000;
A=rand(n,n); b=rand(n,n);
tic
invA=inv(A); x1=invA*b;
toc
tic
x2=A\b;
toc
max(max(abs(x1-x2))),