You don't show your data, so I need to make something up, and I'm guessing what your problem is, because your question is confusing. But I think this is your question:
What is the area between my curve and the x axis? So negative regions of the curve, they will still have positive area. For example:
If we use trapz to integrate this curve, we will get zero.
The positive and negative parts compensate exactly. So I think you want to find the are between the curve and the x axis. BUT, if you do this:
it mistakes the area, because of the region near x==pi.
The problem is, that part of the curve wants to hit zero between the sampled points, so right at x==pi.
Instead, you need to interpolate the data, then use integral on the absolute value of the interpolation function. For example...
fplot(@(x) abs(fnval(spl,x)),[0,2*pi])
You should see it now does touch down to zero at x==pi. And integral gives a better estimate of the true area.
integral(@(x) abs(fnval(spl,x)),0,2*pi)
Note that trapz will under-estimate that area because it does so on an always concave-down function, and it over-estimates the area because of the problem near x==pi.