HM1_Aufgabenserie7/Schenk_Brandenberger_S7_Auf...

16 lines
347 B
Python
Raw Normal View History

2022-11-14 23:06:06 +01:00
import numpy as np
import scipy
if __name__ == '__main__':
2022-11-14 23:06:28 +01:00
# Aufgabe 2c
2022-11-14 23:06:06 +01:00
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)