matlab code to transform linear systems to strictly diagonally dominant matrix
Show older comments
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 Comments
Lukas Arnold
on 16 Apr 2016
use eye function
Ced
on 16 Apr 2016
@jason: Can you elaborate? How would you use eye?
Accepted Answer
More Answers (1)
Ced
on 16 Apr 2016
0 votes
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).
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!