function s3a3(n)

     % in: n               size of Hilbertmatrix

if (nargin<1 | n<1 | mod(n,1)~=0) n=8; end      % default

H  = hilb(n);                    % Hilbertmatrix
Hi = invhilb(n);                 % (analytical) inverse
b  = [1:n]'/n;                   % right hand side
x0 = H\b; x = Hi*b;              % solutions 
rho = norm(H*x0-b)/norm(b);      % relative residual 
delta = norm(x0-x)/norm(x);      % relative error


%output

outp = ['n=',int2str(n),': rho=',num2str(rho,4),...
        ', delta=',num2str(delta,4),...
        ', eps*cond(H)=',num2str(eps*cond(H),4)];
if(delta~=0) outp = [outp,', c=',num2str((eps*cond(H))/delta)];end
disp(outp);

