Jan-18-2021, 07:04 PM
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()
![[Image: Figure_1.png?raw=1]](https://www.dropbox.com/s/ywqjb32ply6eul3/Figure_1.png?raw=1)