Matrix balancing. |
||
Syntax |
S, P, B = balance(A) S, P, B = balance(A, 'noperm') |
|
Argument |
Name |
Description |
A |
A square matrix (n-by-n); real or complex. |
|
'noperm' |
Add this optional parameter to just perform scaling, with no permutation of the matrix content. |
|
Outputs |
Name |
Description |
S |
Scaling vector. |
|
P |
Permutation vector. |
|
B |
Balanced matrix. |
|
Example |
Syntax |
|
A = [2 20; 100 10]; S, P, B = balance(A); print('S = ', S); print('P = ', P); print('B = ', B); |
||
Result |
||
S = [Matrix] 2 x 1 0.5 1
P = [Matrix] 2 x 1 1 2
B = [Matrix] 2 x 2 2 40
50 10 |
||
Comments |
The balance function is based on the LAPACK routines DGEBAL for real matrices and ZGEBAL for the complex case. |
|
See Also: |