Question: In python I have this code. I want to add two more parts to the plot. In the first one where it says value =
In python I have this code. I want to add two more parts to the plot. In the first one where it says value = d_pre(0.88,0.23, 0.38, i) I want to add ten percent to each of those values excluding i. On the second I want to take off 10 percent. I want all of these put onto one plot. Thank you for the help!
from math import exp import matplotlib.pyplot as plt
def d_pre(A0, alpha, h, t): d = A0*((exp(-t/alpha))/(1+(t**h))) return d
x = [] y = []
i = 0.01 while i<=0.51: value = d_pre(0.88,0.23, 0.38, i) x.append(i) y.append(value) i+=0.01 dpre = y x2 = [] y2 = []
plt.plot(x_axis, y_axis)
plt.xlabel('time(s)')
plt.ylabel('predicted response(unitless)')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
