I collected data in LabVIEW
to generate a P-V (pressure-volume) curve
(see link below). I now need to find the area under the curve.
The catch is that there are two portions of the curve I need to address: the area with a red (-) needs to be subtracted from the one with green (+)s. The spacing on the x-axis is inconsistent as well.
I've seen some suggestions for using trapz
and polyarea
, but none of those worked for me. I tried manually finding the bounds, but limiting my trapz/polyarea calls to those bounds still resulted in an area that was entirely too small. Any help is appreciated.