balance
- :
B =balance(A)¶ - :
B =balance(A,¶"noperm") - :
[T, B] =balance(…)¶ - :
[S, P, B] =balance(…)¶ Balance the square matrix A to improve the accuracy of its eigenvalue computation.
Balancing first permutes rows and columns to isolate eigenvalues and then applies a diagonal similarity with power-of-two entries so that corresponding row and column norms are close. B is the balanced matrix. With two outputs T is the similarity matrix such that
B = T \ A * T. With three outputs S holds the scale factors and P the permutation vector withT(:,P) = diag (S).The optional second argument
"noperm"(case-insensitive) scales without permuting rows and columns.