Numerical integration over a circular domain

20 ビュー (過去 30 日間)
Kobye
Kobye 2013 年 10 月 23 日
回答済み: Jan 2013 年 10 月 23 日
I have an analytic function defined over x=[0,100] and y=[0,100]. I do not know the precise workings of the function, just that it is smooth, takes in inputs (x,y) and returns a scalar.
It is quite straightforward to numerically integrate this function over a rectangular domain using the function integral2. However, I would like to integrate the function over a circle. For simplicity's sake let's have it centered at (x,y)=(50,50) with a radius of 10.
How would I be able to achieve this? Remember I cannot modify the function by substituting x = 50+10*cos(theta) and y=50+10*sin(theta).
An example function below.
func = @(x,y) x^3*y+x*y^2;
for i=1:100
for j=1:100
data(i,j)=func(i,j);
end
end
surf(1:100,1:100,data)

回答 (1 件)

Jan
Jan 2013 年 10 月 23 日
I would try to transform the scalar field into polar coordinates and do numerical integration over a square window there. Of course you have to take care of the translation prior to coordinate transformation to make sure, that the circles center is located in the origin.

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by