2022-11-10 21:35:17 +01:00
|
|
|
import numpy as np
|
|
|
|
from Schenk_Brandenberger_S6_Aufg2 import *
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
# Beispiel 4.1 + 4.3 aus den Vorlesungsfolien
|
|
|
|
A = np.array([[-1.0, 1.0, 1.0],
|
|
|
|
[1.0, -3.0, -2.0],
|
|
|
|
[5.0, 1.0, 4.0]])
|
|
|
|
b = np.array([[0.0],
|
|
|
|
[5.0],
|
|
|
|
[3.0]])
|
|
|
|
c = np.array([[13.0],
|
|
|
|
[-32.0],
|
|
|
|
[22.0]])
|
|
|
|
|
|
|
|
result, det = Schenk_Brandenberger_S6_Aufg2(A, c)
|
|
|
|
print("Ergebnis:")
|
|
|
|
for i in range(len(result)):
|
|
|
|
print("x" + str(i) + ": " + str(result[i]))
|
|
|
|
print("Determinante: " + str(det))
|