Jan-18-2021, 08:06 PM
(Jan-18-2021, 07:04 PM)Axel_Erfurt Wrote: I don't know what you want to do, but this gives me a result
import numpy as np from matplotlib import pyplot as plt def derived_f(ft): return(4 + 3 * ft) t0 = 0 f0 = 0 t_end = 2 N = 10000 h = (t_end - t0) / (N - 1) t = np.linspace(t0, t_end, N) f = np.zeros(N) f[0] = f0 for i in range(N - 1): f[i + 1] = f[i] + derived_f(t[i]) * h plt.plot(t, f) plt.title("Title") plt.xlabel("xlabel") plt.ylabel("ylabel") plt.show()
Thanks, may have been unclear in the description but this is what I wanted to get. Thanks for the help, appreciate it!