diff --git a/src/serie_3.py b/src/serie_3.py new file mode 100644 index 0000000..439db62 --- /dev/null +++ b/src/serie_3.py @@ -0,0 +1,32 @@ +# %% +import numpy as np +import matplotlib.pyplot as plt + +# %% +print("----------------------------------------------------------------") +print(__file__) +print("Aufgabe 2. Interpolationspolynome gemäss NEWTON-Schema berechnen") +print("----------------------------------------------------------------") + +# punkte [[x0, x1, x2, xn], [y0, y1, y2, yn]] +punkte = [ + [np.array([4, 8]), np.array([1, -1])], + [np.array([-1, 1, 2]), np.array([15, 5, 9])], + [np.array([-1, 0, 1, 2]), np.array([-5, -1, -1, 1])], +] + +for punkt in punkte: + + # Parameter + x_data = punkt[0] + y_data = punkt[1] + x_0 = x_data[0] + x_e = x_data[-1] + N = 201 + lw = 3 + fig = 1 + + # Berechnung + + +print("----------------------------------------------------------------")