matlab code to transform linear systems to strictly diagonally dominant matrix
Ältere Kommentare anzeigen
I need matlab syntax to transform a linear system Ax=b to strictly diagonally dominant matrix. For example given A=[6 5 7; 4 3 5; 2 3 4] b=[18 12 9]' I want to transform the coefficient matrix A to another matrix B such that matrix B is strictly diagonally dominant and b to another vector d
2 Kommentare
Lukas Arnold
am 16 Apr. 2016
use eye function
Ced
am 16 Apr. 2016
@jason: Can you elaborate? How would you use eye?
Akzeptierte Antwort
Weitere Antworten (1)
Ced
am 16 Apr. 2016
0 Stimmen
Without giving away the whole solution, one way would be to diagonalize your linear system. What you need to do is thus to find the transformation matrices P such that
B = P*A*P.'
is diagonal (and apply the same transformation to b), i.e. using eig.
If it is not diagonalizable, you can use svd to transform it in such a way, or see here. Note that all this is only possible if A is non-singular (otherwise, you can reshape A with linear row operations such that a row of zeros appears, which is obviously not strictly diagonally dominant).
Kategorien
Mehr zu Linear Algebra finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!