% Analyzes increase of ill-conditioning with the size
% of the matrix

% Originally written by Dr. D. Pelinovsky


for n = 1 : 15

  A = hilb(n); B = inv(A); C = A*B;

  c1 = cond(A); c2 = det(A); c3 = det(B);

  d1 = c2*c3; d2 = cond(C);

fprintf('n = %2d   Cond = %3.1e,   Det = %3.1e,   Det*Det^-1 = %3.1e,   sp(A*A^-1) =%3.1e\n',n,c1,c2,d1,d2);

end  
