function [x]=bsub1(u,b)
%routine to solve the upper tringular matrix equation by 
% back substitution
n=length(u);
for i=n:-1:1
      x(i)=b(i);
      for j=i+1:n
         x(i)=x(i)-u(i,j)*x(j);
      end
      x(i)=x(i)/u(i,i);
end
x=x';
