You are a bit ambiguous here, but I will guess I understand what you are asking.

You have a quad mesh over that domain. At each vertex of the mesh, you have a KNOWN value z(x,y).

Now you want to compute the two dimensional integral of z(x,y) over that domain? So the result will be a single scalar value. If this is your goal, then the answer is pretty simple.

- Reduce the quadrilateral mesh to a triangle mesh. That just requires you to arbitraily split each quad into a pair of triangles.
- The integral over that domain is easy, because the integral is just the sum of the integrals over each triangle.
- The integral over any triangle is easy, because it is just the sum of the z values at each vertex, multiplied by the area of the corresponding triangle, then dividing by 2.

In fact, you can do all of the above in not much more than one line, in a fully vectorized form. I'd probably take a few lines writing it to make it more readable of course.

What I don't know is if this is really your question. (It is often something completely different from what I might guess.) And I don't know for sure how your data is organized. So I won't write code unless I know what the problem really is. Otherwise, I might just be wasting my time.

It might help more to post your data (as a .mat file attachment to a comment.)

Of course, you could also write the solution in a slightly more complex way, working with the quad mesh itself. Then you need to integrate the unknown surface over each quad, then sum the results. Again, not that terribly difficult, IF this is really your goal.

The idea comes up in finite element methods, here is a start to read:

## 2 Comments

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/498300-how-to-integrate-discrete-values-over-a-surface#comment_781583

⋮## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/498300-how-to-integrate-discrete-values-over-a-surface#comment_781583

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/498300-how-to-integrate-discrete-values-over-a-surface#comment_781592

⋮## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/498300-how-to-integrate-discrete-values-over-a-surface#comment_781592

Sign in to comment.