Function X = uptrbk(A,B)
%Input – A is an N x N nonsingular matrix
% B is an N x 1 matrix
% Output – X is an N x 1 matrix containing the solution to AX=B
% Initialize X and the temporary storage matrix C
[N N] = size(A);
X=zeros(N,1);
C=zeros(1,N+1);
%Form the augmented matrix: Aug=[A|B]...