Professional Documents
Culture Documents
Prob 2 - Gauss Elimination
Prob 2 - Gauss Elimination
D1 X1 = 0.35
X2 = 0.54
X3 = 0.04
X4 = 0.07
X1 = 0.16
X2 = 0.42
B1 X3 = 0.24
70 mol/min X4 = 0.18
X1 = 0.2 X1 = 0.21
D2 X2 = 0.54
X2 = 0.4
X3 = 0.10
X3 = 0.25
X4 = 0.15
X4 = 0.15
B
X1 = 0.01
X2 = 0.10
B2 X3 = 0.65
X4 = 0.24
b) Write a more general code where the condition of partial pivoting is included. Check if
the code is successfully run for the following matrix.
1 −1 2 𝑥1 −8
[2 −2 3] [𝑥2 ] = [−20]
1 1 1 𝑥3 2