clear 

A=HilbertMatrix(16);
b=ones(16,1);

[L,U]=LUnopivot(A);
y=LTriSol(L,b);
x=UTriSol(U,y);

resA=norm(b-A*x);

D=diag(diag(A));
C=D\A;
cA=cond(A);
cC=cond(C);

[L,U]=LUnopivot(C);
y=LTriSol(L,D\b);
x=UTriSol(U,y);

resC=norm(b-A*x);

D=tril(A);
C=D\A;
cG=cond(C);

[L,U]=LUnopivot(C);
y=LTriSol(L,D\b);
x=UTriSol(U,y);

resG=norm(b-A*x);

[cA cC cG]
[resA resC resG]