How to integrate discrete values over a surface
이전 댓글 표시
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
darova
2019년 12월 28일
Do you have a picture? Please attach the data
Valeria Marangon
2019년 12월 28일
채택된 답변
추가 답변 (2개)
darova
2019년 12월 28일
0 개 추천
If your mesh if fine enough you can just multiply sides

For better precision cross product can be used
댓글 수: 3
John D'Errico
2019년 12월 28일
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
2019년 12월 28일
- But that is just a complete conjecture at this point.
good
John D'Errico
2019년 12월 29일
편집: John D'Errico
2019년 12월 29일
Actually, I was kind of close, though the area of a quadrilateral does figure into the solution. They were not rectangles though.
Deepanjan Das
2021년 9월 13일
0 개 추천
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
darova
2021년 9월 13일
Are
and
always the same?
Deepanjan Das
2021년 9월 13일
편집: Deepanjan Das
2021년 9월 13일
No, it depends on the created mesh. Around the boundaries the elements are much smaller in size.
카테고리
도움말 센터 및 File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

