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.
2 Comments
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/497225-area-under-curve-and-above-x-axis-only-and-between-x-axis-limits#comment_779181
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/497225-area-under-curve-and-above-x-axis-only-and-between-x-axis-limits#comment_779181
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/497225-area-under-curve-and-above-x-axis-only-and-between-x-axis-limits#comment_779757
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/497225-area-under-curve-and-above-x-axis-only-and-between-x-axis-limits#comment_779757
Sign in to comment.