How to do an elimination procedure to represent the solution (matrix)

1 回表示 (過去 30 日間)
Jonas Morgner
Jonas Morgner 2022 年 4 月 17 日
編集済み: Torsten 2022 年 4 月 18 日
Apply the elimination procedure until you reach a matrix that represents
the solution (identity matrix + column with the values for x1, x2 and x3,
see slide 1.1-14 from Linear Algebra). Include each step (code needed)
in the report and explain the process.
The polynomials:
x1 - 2x2 + x3 = 0
2x2 - 8x3 = 8
-4x1 + 5x2 +9x3 = -9

採用された回答

Sam Chak
Sam Chak 2022 年 4 月 17 日
Can you show the slides and elimination formulas? Otherwise, I think this elimination procedure:
A = [1 -2 1;
0 2 -8;
-4 5 9]
b = [0; 8; -9]
[L, U, P] = lu(A)
y = L\(P*b)
x = U\y
  3 件のコメント
Jonas Morgner
Jonas Morgner 2022 年 4 月 18 日
I just got one question. If I am undestanding your code correctly, the y = L/(P*b) and x = U/y are the factors to solve the linear system right?
Torsten
Torsten 2022 年 4 月 18 日
編集済み: Torsten 2022 年 4 月 18 日
y = L\(P*b)
is forward substitution,
x = U\y
is back substitution.
Be careful with the direction of the slash - above, you did it wrong.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by