function [alpha,beta]=trilu(a,b,c)
%
%TRILU - Reduced LU decomposition of tridiagonal matrix.
%
m=length(a);
alpha=zeros(m,1); 
beta=zeros(m,1);

alpha(1)=a(1);
for k=2:m
    beta(k)=b(k)/alpha(k-1);
    alpha(k)=a(k)-beta(k)*c(k-1);
end
