Solved Task 3

This commit is contained in:
schrom01 2022-11-17 18:41:15 +01:00
parent 3f4275b81f
commit cd88f40805
1 changed files with 4 additions and 2 deletions

View File

@ -10,11 +10,13 @@ if __name__ == '__main__':
x = np.array([0, 2, 9, 13]) x = np.array([0, 2, 9, 13])
y = np.array([150, 104, 172, 152]) y = np.array([150, 104, 172, 152])
A = np.array([[x[0]**3, x[0]**2, x[0]**1, x[0]**0], A = np.array([
[x[0]**3, x[0]**2, x[0]**1, x[0]**0],
[x[1]**3, x[1]**2, x[1]**1, x[1]**0], [x[1]**3, x[1]**2, x[1]**1, x[1]**0],
[x[2]**3, x[2]**2, x[2]**1, x[2]**0], [x[2]**3, x[2]**2, x[2]**1, x[2]**0],
[x[3]**3, x[3]**2, x[3]**1, x[3]**0]]) [x[3]**3, x[3]**2, x[3]**1, x[3]**0]])
b = np.array([[y[0]], b = np.array([
[y[0]],
[y[1]], [y[1]],
[y[2]], [y[2]],
[y[3]]]) [y[3]]])