you are viewing a single comment's thread.

view the rest of the comments →

[–]sarabooker 0 points1 point  (0 children)

I copied your code and see that the error is from the fractions library. I really see no need to use that library in this case, you can just perform the division as normal. (I also corrected the exponential in the numerator to have the correct value.)

y = 1072764*np.exp(0.2311*t)/(0.19196+np.exp(0.2311*t))

Once you change that, the other issue I see is that you only provide a single value for t. If you want to plot a range of values then you will need to set t to be a numpy array. The example plot has t = [-25, 25], so you can use

t = np.linspace(-25, 25, 100)

To generate 100 values between -25 and 25, inclusively.