Relative Content

Tag Archive for pythonnumpynumerical-integration

Why the discrepancy between my trapezoidal and numpy’s trapezoidal integration?

I wrote my trapezoidal integration function to approximate the area under the curve for vehicle crash analysis. The function will take in two numpy vectors: (1) time vector and (2) acceleration or force. Thus, when I integrate, I’ll get velocity (if I put in acceleration vector) or total impulse exerted on the vehicle (if I put in the force).