Question: In Python, I have this code. I want to store the value of d for each t value from .01 to .51. I'm sure it's
In Python, I have this code. I want to store the value of d for each t value from .01 to .51. I'm sure it's super easy but I can't figure it out.
from math import exp import matplotlib.pyplot as plt
def d_pre(A, alpha, h, t): d = A*((exp(-t/alpha))/(1+(t**h))) return d
x_axis = [] y_axis = []
i = 0.01 while i<=0.51: value = d_pre(0.88,0.23, 0.38, i) x_axis.append(i) y_axis.append(value) i+=0.01
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
