필터 지우기
필터 지우기

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 CenterFile Exchange에서 Time Series에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by