How to integrate discrete values over a surface
Mostrar comentarios más antiguos
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 comentarios
darova
el 28 de Dic. de 2019
Do you have a picture? Please attach the data
Valeria Marangon
el 28 de Dic. de 2019
Respuesta aceptada
Más respuestas (2)
darova
el 28 de Dic. de 2019
0 votos
If your mesh if fine enough you can just multiply sides

For better precision cross product can be used
3 comentarios
John D'Errico
el 28 de Dic. de 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
el 28 de Dic. de 2019
- But that is just a complete conjecture at this point.
good
John D'Errico
el 29 de Dic. de 2019
Editada: John D'Errico
el 29 de Dic. de 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
el 13 de Sept. de 2021
0 votos
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 comentarios
darova
el 13 de Sept. de 2021
Are
and
always the same?
Deepanjan Das
el 13 de Sept. de 2021
Editada: Deepanjan Das
el 13 de Sept. de 2021
No, it depends on the created mesh. Around the boundaries the elements are much smaller in size.
Categorías
Más información sobre Numerical Integration and Differentiation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

