%
%  M 551 2/26/13 
%
% demos using example from sec 2.8 but 
% here using 16 digit arithmetic
%
%

>> A=[.780 .563; .913 .659]

A =

    0.7800    0.5630
    0.9130    0.6590

>> b=[.217; .254]

b =

    0.2170
    0.2540


 
>> cond(A)

ans =

   2.1932e+06

>> x=A\b

x =

    1.0000
   -1.0000

>> format long
>> x=A\b

x =

   0.999999999981709
  -0.999999999974659
%
%  Note all but the last 5 digits are correct,
%  but the residual is O(eps).
%
>> A*[1;-1]-b

ans =

   1.0e-16 *

   0.832667268468867
                   0

>> A*[1;-.443]-b

ans =

   0.313591000000000
   0.367063000000000

>> A*[-.443;1]-b

ans =

   1.0e-03 *

   0.459999999999933
   0.541000000000014

%
%  plot of the lines A(1,1)*x11 + A(1,2)*x12 = b(1)
%
%              and   A(2,1)*x21 + A(2,2)*x22 = b(2)        
%
>> x11=-2:.1:2;
>> x12=(b(1)-A(1,1)*x11)/A(1,2);
>> x21=-2:.1:2;
>> x22=(b(2)-A(2,1)*x21)/A(2,2);
>> plot(x11,x12,x21,x22)
%
%  Why do you only see one line? 
%
%  Note:
>> norm(x12-x22)

ans =

     2.673644985203899e-05

