% ==========================================================================
% equations3.m: Solve 3x3 system of linear equations via method of Gauss-
%               Seidel Iteration.
%
% Written By: Mark Austin                                         April 2007
% ==========================================================================

% Setup matrix equations ....

  fprintf('Matrix Equations\n');
  fprintf('==================================\n');

  A = [ 10  2   6;
         1 10   9;
         2 -7 -10 ]

  B = [ 28; 7; -17 ]

% Compute and print solution via Gauss-Seidel Iteration....

  fprintf('Solution Vector\n');
  fprintf('==================================\n');

  x = gaussseidel(A,B)

% Validate solution

  fprintf('Residual: Ax - B \n');
  fprintf('==================================\n');

  Residual = A*x - B

% ========================================================================
% End!
