0
This is my code:
index = 0
T = np.zeros((300,1))
T[:,0] = np.linspace(0.01, 3, 300)[:]
A = np.loadtxt('AAA_'+str(index)+'.txt')
Tr = 1.0
idx = (abs(T-(Tr))).argmin()
a = T[:idx+1]
a = [i[0] for i in a]
b = A[:idx+1]
area = np.trapz(a, b)
plt.plot(T, A)
plt.show()
My goal is to get the area marked in red in the figure, and I do not know the function that defines the blue curve. I tried to integrate using the rule of trapezoids, however without success. What am I doing wrong? Any suggestions to try to solve this problem?
Thank you!
That helping?
– Paulo Marques
@Paulomarques Helped yes! Thank you very much for your attention!!!
– user220318