From 10ecec493f5a8ab93bb4f31e8a2b774c777a005d Mon Sep 17 00:00:00 2001 From: schrom01 Date: Wed, 28 Sep 2022 10:31:16 +0200 Subject: [PATCH] Solved Task 1A --- Schenk_Roman_IT21bWIN_Test_Aufg1.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Schenk_Roman_IT21bWIN_Test_Aufg1.py diff --git a/Schenk_Roman_IT21bWIN_Test_Aufg1.py b/Schenk_Roman_IT21bWIN_Test_Aufg1.py new file mode 100644 index 0000000..d21e85c --- /dev/null +++ b/Schenk_Roman_IT21bWIN_Test_Aufg1.py @@ -0,0 +1,24 @@ +import numpy as np + +A = np.array([[1, 2, 3, 4], + [2, 3, 4, 1], + [3, 4, 1, 2], + [4, 1, 2, 3]]) + +B = np.array([[5, 4, 3, 2], + [4, 3, 2, 5], + [3, 2, 5, 4], + [2, 5, 4, 3]]) + +b = np.array([[1], + [2], + [3], + [4]]) + +#Task A: +print("Ab:\n", A @ b) +print("Bb:\n", B @ b) +print("A^T:\n", A.T) +print("B^T:\n", B.T) +print("A^TA:\n", A.T @ A) +print("B^TB:\n", B.T @ B) \ No newline at end of file