Integrate pressure over area, from dataset points
Show older comments
Hi, i want to compute the integral over the area of the pressure distribution p(x,y). I have vectors x and y ,say each one of size n by 1,containing the coordinates at which the pressure is known, and a vector of pressures, size n by 1, with the pressure at each coordinate. I thought i could use trapz 2 times to compute the integral first in one direction and then the other, but to do this i would need a Matrix of pressure, instead i have a vector of the same size of the coordinates x and y. I also know that the area I have is an anulus surface, as i can see from plotting using stem3(x,y,p). The coordinates are taken w.r.t the center of the anulus, in cartesian coordinates. Hope you can help me figure this out, thanks.
5 Comments
Dyuman Joshi
on 30 Oct 2023
Well the basic mathematics is to multiply the pressure at a given radius with the area of ring corresponding to the given radius, and sum for all the values for radius values.
But this approach comes with a set of assumptions, that might not be valid for the data you have.
We will need the data you are working with to suggest a working solution.
Francesco Brescia
on 30 Oct 2023
Edited: Torsten
on 30 Oct 2023
Image Analyst
on 30 Oct 2023
You most likely want to use scatteredInterpolant as @Torsten shows in his answer below (scroll down).
Dyuman Joshi
on 31 Oct 2023
Why not just sum the discrete values of Pressure-force at each point?
If your suggestion was used, the density of the measurement points had to mirror the areas associated with them. But imagine data accumulating in a certain area while in another, there are almost no measurements. In this case, the weights for the datapoints in the integration couldn't be equally chosen.
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differentiation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

