Solved Task 2
This commit is contained in:
parent
6c528077ac
commit
f3ee0390aa
|
@ -31,7 +31,6 @@ def Schenk_Brandenberger_S6_Aufg2(A, b):
|
||||||
countRowSwitch += 1
|
countRowSwitch += 1
|
||||||
else:
|
else:
|
||||||
A, b = calculateRow(A, b, row, column)
|
A, b = calculateRow(A, b, row, column)
|
||||||
|
|
||||||
print("\nObere Dreiecksmatrix A:\n", A, "\nb:\n", b)
|
print("\nObere Dreiecksmatrix A:\n", A, "\nb:\n", b)
|
||||||
|
|
||||||
# Rückwärtseinsetzen
|
# Rückwärtseinsetzen
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,21 @@
|
||||||
|
import numpy as np
|
||||||
|
import scipy
|
||||||
|
|
||||||
|
import Schenk_Brandenberger_S7_Aufg1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
# Überprüfung Aufgabe 2
|
||||||
|
A = np.array([[0.8, 2.2, 3.6],
|
||||||
|
[2.0, 3.0, 4.0],
|
||||||
|
[1.2, 2.0, 5.8]])
|
||||||
|
|
||||||
|
b = np.array([[2.4],
|
||||||
|
[1.0],
|
||||||
|
[4.0]])
|
||||||
|
|
||||||
|
p, l, u = scipy.linalg.lu(A)
|
||||||
|
print("\np:\n", p, "\nl:\n", l, "\nu:\n", u)
|
Loading…
Reference in New Issue