2019年1月15日 星期二

高斯消去法


高斯消去法

Ax=b

======================
E1 :   -x1   +   x2   +  2x3   = 2
E2 :   3x1   -   x2   +    x3   = 6

E3 :   -x1   +   3x2 +  4x3   = 4

======================
利用 online gaussian elimination calculator
https://matrix.reshish.com/gauss-jordanElimination.php



Your matrix
X1X2X3b
1-1122
23-116
3-1344
Find the pivot in the 1st column in the 1st row (inversing the sign in the whole row)
X1X2X3b
11-1-2-2
23-116
3-1344
Multiply the 1st row by 3
X1X2X3b
13-3-6-6
23-116
3-1344
Subtract the 1st row from the 2nd row and restore it
X1X2X3b
11-1-2-2
202712
3-1344
Multiply the 1st row by -1
X1X2X3b
1-1122
202712
3-1344
Subtract the 1st row from the 3rd row and restore it
X1X2X3b
11-1-2-2
202712
30222
Make the pivot in the 2nd column by dividing the 2nd row by 2
X1X2X3b
11-1-2-2
2013.56
30222
Multiply the 2nd row by -1
X1X2X3b
11-1-2-2
20-1-3.5-6
30222
Subtract the 2nd row from the 1st row and restore it
X1X2X3b
1101.54
2013.56
30222
Multiply the 2nd row by 2
X1X2X3b
1101.54
202712
30222
Subtract the 2nd row from the 3rd row and restore it
X1X2X3b
1101.54
2013.56
300-5-10
Make the pivot in the 3rd column by dividing the 3rd row by -5
X1X2X3b
1101.54
2013.56
30012
Multiply the 3rd row by 1.5
X1X2X3b
1101.54
2013.56
3001.53
Subtract the 3rd row from the 1st row and restore it
X1X2X3b
11001
2013.56
30012
Multiply the 3rd row by 3.5
X1X2X3b
11001
2013.56
3003.57
Subtract the 3rd row from the 2nd row and restore it
X1X2X3b
11001
2010-1
30012
Solution set:
x1 = 1
x2 = -1
x3 = 2

沒有留言:

張貼留言

WOKWI DHT22 & LED , Node-Red + SQLite database

 WOKWI DHT22 & LED , Node-Red + SQLite database Node-Red程式 [{"id":"6f0240353e534bbd","type":"comment&...