MATLAB: Find area of irregular circle

2d area2d numerical integrationarea calculationshysterisis estimation

Hi all
I have a waveform looking like the attached picture (it necessarily does not have this form but something kinda similar) which I want to calculate the area of the hysterisis, that is the area enclosed by the one complete loop.
I would like to do this 10 times as I have 10 cycles within the plot. And then calculate the mean and sd of the area afterwards, which should be a trivia task once the areas are calculated. However I am not quite sure how to do this area calculation/estimation. I have a 1D volume array and a 1D pressure array, which contains the before mentioned 10 cycles of data.
I have not tried anything at the moment, as I don't have any good ideas on where to start. I should not supprise me if matlab had somekind of tool build in for this task, however I just don't know it 🙂
Hope I made my problem clear, else I will of cause elaborate if so desired.
Best, Tommy

Best Answer

You have the data in hand....pick the data of each cycle and use polyarea.