21 lines
401 B
Python
21 lines
401 B
Python
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) |