2

Please i need help. I need somebody who can help me with matlab codes to transform a non diagonally dominant non singular matrix to first row diagonally dominant matrix.Given a linear system of Ax=b shown below $$(a_{11}~~a_{12}~~ ... ~~a_{1n})x_{1} =b_{1}\\ (a_{21}~~a_{22}~~ ... ~~a_{2n})x_{2} = b_{2}\\ (.~~~~~. ~~~~~~~...~~~~~~ )~~ . = ~~.\\ (.~~~~~. ~~~~~~~...~~~~~~ )~~ . = ~~.\\ (.~~~~~. ~~~~~~~...~~~~~~ )~~ . = ~~.\\ (a_{n1}~~a_{n2}~~ ... ~~a_{nn})x_{n} = b_{n}$$

From the coefficient matrix A we want to extract the linear system of the form
Cy=d Where C and d are extracted from coefficient matrix A. I need matlab code to extract C and d and solve the linear system for $y_{2}$ to $y_{n}$ $$(a_{22} ~~ a_{32}~~a_{42} ~~...a_{n2})y_{2} = -a_{12}\\ (a_{23} ~~ a_{33}~~a_{43} ~~...a_{n3}) y_{3}= -a_{13}\\ (.~~~~~. ~~~~~~~...~~~~~~ )~~ . = ~~.\\ (.~~~~~. ~~~~~~~...~~~~~~ )~~ . = ~~.\\ (.~~~~~. ~~~~~~~...~~~~~~ )~~ . = ~~.\\ (a_{2n}~~a_{3n}~~a_{4n} ... ~~a_{nn})y_{n} =- a_{1n}$$ And matlab code to compute $e_{11}$ and $f$ $$e_{11} = a_{11} + y_{2}a_{21} + y_{3}a_{31} + . . . + y_{n}a_{n1}$$ $$f =b_{1} +y_{2}b_{2} + y_{3}b_{3} + . . . + y_{n}b_{n} $$ A matlab code to output the new transform of the form Tx=g as shown below $$(e_{11}~~ 0~~ 0~~ . . . 0 )x_{1}= f\\ (a_{21}~~a_{22}~~ ... ~~a_{2n})x_{2} = b_{2}\\ (a_{31}~~a_{32}~~ ... ~~a_{3n})x_{2} = b_{3}\\ (.~~~~~. ~~~~~~~...~~~~~~ )~~ . = ~~.\\ (.~~~~~. ~~~~~~~...~~~~~~ )~~ . = ~~.\\ (.~~~~~. ~~~~~~~...~~~~~~ )~~ . = ~~.\\ (a_{n1}~~a_{n2}~~ ... ~~a_{nn})x_{n} = b_{n}$$

Required a matlab syntax to achieve this. Thank you.

segun
  • 21

0 Answers0