フィルターのクリア

Integrate a 2D gaussian over its FWHM

9 ビュー (過去 30 日間)
Sujay Ray
Sujay Ray 2020 年 12 月 6 日
回答済み: Shadaab Siddiqie 2020 年 12 月 9 日
Hi,
I need some help to integrate over a 2D gaussian function below... with limits (x0-FEHMx/2) to (x0+FEHMx/)2 and (y0-FEHMy/2) to (y0+FEHMy/2).
function F = D2GaussSingle(x,xdata)
F = x(1)*exp( -((xdata(:,:,1)-x(2)).^2/(2*x(3)^2) + (xdata(:,:,2)-x(4)).^2/(2*x(5)^2) ) )+x(6) ;
end
I am not sure how to integrate and parametrize at the same time. Lets say My gaussian fit gives me values of x as [5000, 0,2.5,-0.1,2.4,500] ; (parameters [Amp,xo,wx,yo,wy,background]). I have tried the following but am not able to get it to work. can someone please help.
fun=@ D2GaussSingle(x);
sumN = integral2(fun,x(2)-FWHMx/2,x(2)+FWHMx/2,x(4)-FWHMy/2,x(4)+FWHMy/2);
fun = @(x,xdata)D2GaussSingle(x,xdata);
n = integral(@(xdata)fun(x,xdata),0,100);

回答 (1 件)

Shadaab Siddiqie
Shadaab Siddiqie 2020 年 12 月 9 日
From my understanding you want integrate a 2D function here is a integration resource which might help you.

カテゴリ

Help Center および File ExchangeTime Series についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by