0

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.

enter image description here

Stewie Griffin
  • 14,889
  • 11
  • 39
  • 70
  • Please post your code attempts using `trapz` and `polyare`. Also when you say area under the curve... I assume you actually mean area within the closed regions? – Dan Feb 19 '14 at 06:10
  • Also can you show us your X and Y values? Do you have around four Y values for each X? What exactly do you mean by "The spacing on the x-axis is inconsistent"? – McMa Feb 19 '14 at 08:08
  • Is everything a single graph? is the curve self intersecting? – patrik Feb 19 '14 at 08:34
  • I apologize--notification emails were routed to my spam folder, so I didn't see any of these questions. I've since figured it out (a different way), but thank you all the same! – user3326627 Feb 26 '14 at 06:48
  • Heey user3326627, i have the same question, but i cannot figure out how to do it. As it seems you have found a solution, could you post it here? I would really appreciate it. – user3355516 Feb 26 '14 at 11:13

0 Answers0