If AA is triangular, the diagonal elements of AA and BB,alpha = diag(AA)
beta = diag(BB)are the generalized eigenvalues that satisfyA*V*diag(beta) = B*V*diag(alpha)
diag(beta)*W'*A = diag(alpha)*W'*BThe eigenvalues produced bylambda = eig(A,B)are the element-wise ratios of alpha and beta.
lambda = alpha ./ beta