balancing of pair of symmetric matrices
T=equil(P,Q)
:P, Q two positive definite symmetric matrices : :T nonsingular matrix :
equil returns t such that:
T*P*T’ and inv(T)’*Q*inv(T) are both equal to a same diagonal and positive matrix.
P=`rand`_(4,4);P=P*P';
Q=`rand`_(4,4);Q=Q*Q';
T=equil(P,Q)
`clean`_(T*P*T')
`clean`_(`inv`_(T)'*Q*`inv`_(T))