Posts by user220318 • 23 points
3 posts
-
0
votes2
answers58
viewsQ: Insert values into an array with dimensions defined from a loop
Good afternoon, I am trying to save values in the form of an array from different text files, using a loop. I need the values obtained from the first iteration to be stored in the first line of the…
-
0
votes0
answers38
viewsQ: Python: I need to get the area below a curve
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…
-
1
votes1
answer42
viewsQ: Python: I need to get the y coordinate given to x coordinate
Good afternoon! x = [0, 5] y = [2, 4] plt.Plot(x, y) plt.show() I get the following figure. How do I get the value of the y coordinate for the x coordinate equal to 2.5? Thank you.…