I need to calculate the area under the curve. The curve may go down the x axis, but I dont' want to calculate that area. And then it may come up the axis again. Also, I need to calculate area in the limits of 1Hz to 6Hz, as shown in the image attached.
Please help out. I went through the trapz() function, but I don't know, how I can measure the area in this case. Thanks in advance.