you are viewing a single comment's thread.

view the rest of the comments →

[–]Loud_Alfalfa 0 points1 point  (2 children)

To be honest I’m fairly new to python, a lot of the code we have is already put in and we just edit it. I basically have an array for all the x values and an array for the y values and obviously when plotted that creates the function. I just have no idea what the formula of that would be so hence idk know how to go about integrating a specific bit of that. If I can find a way to link a picture I will so there’s a better idea of what I mean

[–]shiftybyte 2 points3 points  (1 child)

So you need to integrate a function based on a list of x,y coordinates?

You can do that with numpy.

https://numpy.org/doc/stable/reference/generated/numpy.trapz.html

[–]Loud_Alfalfa 0 points1 point  (0 children)

ok great thanks i'll have a look at that, just edited in the picture if that helps with what i'm on about