balance
Balance a square matrix.
(D,B)=balance(A)
Inputs
A A square matrix.
Outputs
D A diagonal matrix of the same size as A .
B A matrix of the same size as A .


Description
For a square matrix A , balance(A) returns a diagonal matrix D such that
    D\B*D=A
The object of the computation is to find a D such that B is better conditioned than A for eigenvalue computations.