Integrate a matrix over a surface

11 ビュー (過去 30 日間)
Maryam
Maryam 2013 年 8 月 9 日
回答済み: Sulaymon Eshkabilov 2023 年 8 月 14 日
Hello all
I want to know how can I integrate a matrix in MATLAB. Basically, I have a rectangular region in which x is from xmin:xmax and y is from ymin and ymax. I have the the coordinates of all the points in this region in discrete values. This means that I have two matrices of x and y which show the locations on my rectangular region. On each of these locations I have a z value (showing the pressure coefficient). So, for example x(1,1), Y(1,1), and z(1,1) show the x location, y location, and the value of pressure coefficient on location 1, respectively. I need to integrate my z matrix over my rectangular region (I want to calculate lift force from z*area). I read somewhere that using trapz two times can give the integral of my matrix z. However, I do not know which intervals is considered in trapz. I have searched the net alot but I could not find any solution. Does anyone know how I can do this integration?
Regards Maryam
  1 件のコメント
Jakob Aberhan
Jakob Aberhan 2023 年 7 月 19 日
I have the same question, any ideas ?

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

回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 8 月 14 日
Numerical integration can be done using trapz() fcn: see DOC
Regions in your exercise: x = [xmin, xmax], y = [ymin, ymax];

カテゴリ

Help Center および File ExchangeNumerical Integration and Differentiation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by