필터 지우기
필터 지우기

How to calculate the area average of data

조회 수: 13 (최근 30일)
Mainul Hoque
Mainul Hoque 2020년 8월 29일
답변: Bruno Luong 2020년 8월 29일
Hi
The attached data point has three colums such as x (mm), y (mm) and vorticity (1/s). I have used griddata to visualise the spatial distribution of vorticity value. But I want to caluculate the area average value of the vorticity.
The physical dimesion of the field of view is 37 mm x 27 mm. If you need more information pls feel free to ask me.
Much appriciated your help. Thanks
Regards
Mohammad
  댓글 수: 2
dpb
dpb 2020년 8월 29일
Define what you mean by "area average"
Mainul Hoque
Mainul Hoque 2020년 8월 29일
@dpb if you see the contour you see the x is vary upto 37 mm and y vary up to 27 mm. The formula of the area average is = intregation (vorticity*dA)/A. Here A is the total area and dA is the area of the each cell which is x(2,1)-x(1,1) = 0.3119mm. Thanks

댓글을 달려면 로그인하십시오.

답변 (1개)

Bruno Luong
Bruno Luong 2020년 8월 29일
"The formula of the area average is = intregation (vorticity*dA)/A"
Then the result is simply
>> mean(vor2d,'all','omitnan')
ans =
8.4914
Your data before interpolation is also on grid, just different grid. So this can also give the result (no need to bother with interpolation)
>> mean(vor)
ans =
8.4891

카테고리

Help CenterFile Exchange에서 Fluid Dynamics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by