The graph I'm getting of the function v(t)
using matplotlib.pyplot as plt
and plt.plot(t_test, vel)
is not giving me what it is supposed to. Here is the full code and the resulting plot:
import numpy as np
import matplotlib.pyplot as plt
t_test = np.linspace(0,1,200)
def v(t):
return 1500*(350/2000000) - (350/2000000)*np.log(1-0.00625*t)
vel = v(t_test)
print(vel)
plt.plot(t_test, vel)
plt.show()
The seemingly linear graph is certainly expected since values of t_test
are between 0 and 1, so we're only seeing a small portion of the graph. My issue, however, is that the graph is showing v(0) = 0
when in fact, v(0) = 0.2625
. Why do I have this discrepancy?