% 
% K. Ming Leung, 02/03/03

clear all; format long;
k=7; ep = 10^(-2*k);
A = [ep 1; 1 1];
b = [1 + ep; 2]; 
xExact = [1; 1];
[n n] = size(A);

% Compute the LU factorization of A without pivoting:
[L,U] = LU_factor(A,n);
% Solve Ax = b
y = forwardSubstitution(L,b,n);
x = backSubstitution(U,y,n);
display(x);
Error = norm(x-xExact),

% Compute the LU factorization of A without pivoting:
[L,U] = LU_factor(A,n);
% Solve Ax = b
y = forwardSubstitution(L,b,n);
x = backSubstitution(U,y,n);
display(x);
Error = norm(x-xExact),
