format compact






N = 6;
 V = [1:6] .^2
V =
     1     4     9    16    25    36
A = vander(V);


x = ones(n,1);
{Undefined function or variable 'n'.} 
n = 6;


x = ones(n,1);


b = A*x;

E =  A .* randn(n,n);
e = b .* randn(n,1);

tau = 1.e-10;
B = A + tau*E;
c = b + tau*e;





y = B \ c;



kap = cond(A);

f = tau*kap/(1 - tau*norm(E)*norm(inv(A)))
f =
    0.0166
%% Forw error
ferr = f *(norm(E)/norm(A)+ norm(e)/norm(b))
ferr =
    0.0255
norm(y-x)
ans =
   5.3945e-05

r= b-A*y;

%% backward error
berr = norm(r)/(norm(E)*norm(y)+norm(e))
berr =
   2.8207e-11




diary off
