How to integrate discrete values over a surface
Ältere Kommentare anzeigen
I'm working on the outputs from a numerical model in which I've used a quadrangular mesh around a cylinder. Each element is defined by its coordinates (x, y) and the corresponding value of the parameter that I want to integrate so I have 3 different arrays containing these information.
My problem is related to the domain because I'm working with two circles, one inside the other (e.g. a plate with a hole) and the data related to the smaller one are NaN. I've tried to use trapz in order to get the difference between the two integrals but of course it didn't work. Is there any other way on how to do this?
2 Kommentare
darova
am 28 Dez. 2019
Do you have a picture? Please attach the data
Valeria Marangon
am 28 Dez. 2019
Akzeptierte Antwort
Weitere Antworten (2)
darova
am 28 Dez. 2019
0 Stimmen
If your mesh if fine enough you can just multiply sides

For better precision cross product can be used
3 Kommentare
John D'Errico
am 28 Dez. 2019
I think you mistake, that the problem is not to compute the area of a rectangle, but the integral of a function over such a domain, where the function value is given at the vertices of each rectangle in a mesh. But that is just a complete conjecture at this point.
darova
am 28 Dez. 2019
- But that is just a complete conjecture at this point.
good
John D'Errico
am 29 Dez. 2019
Bearbeitet: John D'Errico
am 29 Dez. 2019
Actually, I was kind of close, though the area of a quadrilateral does figure into the solution. They were not rectangles though.
Deepanjan Das
am 13 Sep. 2021
0 Stimmen
Hi, I am simulating a very simple 2d electrostatic model in Matlab. I have calculated the electric field over a rectangular surface. Now I want to evaluate
. So I know the electric field value at each node but not the function. How can I do the integration? Please let me know. Thanks in advance.
2 Kommentare
darova
am 13 Sep. 2021
Are
and
always the same?
Deepanjan Das
am 13 Sep. 2021
Bearbeitet: Deepanjan Das
am 13 Sep. 2021
No, it depends on the created mesh. Around the boundaries the elements are much smaller in size.
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

