This commit is contained in:
2026-01-22 08:51:18 +01:00
parent 7a170f5ead
commit 7c1b335b1c
5 changed files with 49478 additions and 49398 deletions

28
Proben.py Normal file
View File

@@ -0,0 +1,28 @@
import numpy as np
# d
def atpv_probe(A, P, v, tol=1e-7):
A = np.asarray(A, float)
P = np.asarray(P, float)
v = np.asarray(v, float).reshape(-1, 1)
ATPV = A.T @ P @ v
if np.allclose(ATPV, 0, atol=tol):
print("ATPv-Probe erfolgreich")
else:
print("ATPv-Probe nicht erfolgreich. Fehler bei der Lösung des Normalgleichungssystems")
def hauptprobe(A, x, l, v, tol=1e-7):
A = np.asarray(A, float)
x = np.asarray(x, float).reshape(-1, 1)
l = np.asarray(l, float).reshape(-1, 1)
v = np.asarray(v, float).reshape(-1, 1)
v_test = A @ x - l
if np.allclose(v, v_test, atol=tol):
print("Hauptprobe erfolgreich")
else:
diff = v - v_test
print("Hauptprobe nicht erfolgreich. Abweichung zu v: ", diff)