% Inverting matrices to test left division and accuracy
% Minas Spetsakis, Jan. 2021

sz = 400;
Xorig = rand(sz,1)-rand(sz, 1);
A = rand(sz)-rand(sz);
A = A*A;
%A = A*A;
%A = A*A;
%A = A*A;
cond(A)
B = A*Xorig;
X = A\B;
norm(X-Xorig)/norm(Xorig)
