function tet = tet(alpha,lambda)
[p,n]  = size(alpha);
tet = zeros(p,n-2);

eps=1.e-12;
for i=2:n-1
  for j=1:p
    if lambda(j)>0
        tet(j,i-1) = alpha(j,i-1)./(alpha(j,i)+eps);
    else
        tet(j,i-1) = alpha(j,i+1)./(alpha(j,i)+eps);
    end
  end
end