How can I find integral of a 3-D mesh field?

7 ビュー (過去 30 日間)
Han
Han 2020 年 5 月 21 日
回答済み: darova 2020 年 5 月 21 日
For example, there is a mesh field for 2-D data.
I want to find the integration for the mesh graph that consist of the data value. The values are all positive,
How can I find it?
  2 件のコメント
darova
darova 2020 年 5 月 21 日
Is your dx and dy steps equal? Can you show the surface from the top?
Han
Han 2020 年 5 月 21 日
I don't know what you say about dx and dy. the surface from the top, different from the above figure, can be shown as follows.
The points on the surface are grid points.
x and y range are [0 5000], respectively.

サインインしてコメントする。

回答 (2 件)

Star Strider
Star Strider 2020 年 5 月 21 日
See if using trapz on one or both dimensions of your matrix will do what you want.

darova
darova 2020 年 5 月 21 日
Volume under the surface can be found as
s = 0;
for i = 1:size(A,1)-1
for j = 1:size(A,2)-1
s = s + A(i:i+1,j:j+1); % sum each rectangle points
end
end
s = sum(s(:))/4*dx*dy; % division by 4 - averaging points
See my answer here for more explanations: LINK

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by