function x = ssolve( a,b,n )
%ssolve(a,b,n) 
%HW1, problem 3, MATH 513, Univ. Of Wisconsin, Madison. Spring 2014
%by Nasser M. Abbasi

A              = zeros(n);
A(1,2)         = a;
A(end,1:end-1) = b;

A(logical(eye(size(A)))) = 1;

v        = 1:n;
v(end-1) = 0;

x = A\v(:);
end

