%HW1, problem 2, MATH 513, Univ. Of Wisconsin, Madison. SPring 2014
%by Nasser M. Abbasi
close all; clear all;

N      = 20;
A      = zeros(N);
A(:,1) = 1;
A(logical(eye(size(A)))) = 1;
A(1,1:end-1)   = 1;
A(end,:)       = 1;

b    = zeros(N,1);
b(1) = 17;

x = A\b;

fprintf('solution is \n');  x(:)
%-------------------------------
   -1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
  -17.0000