Borrar filtros
Borrar filtros

Integrate a 2D gaussian over its FWHM

9 visualizaciones (últimos 30 días)
Sujay Ray
Sujay Ray el 6 de Dic. de 2020
Respondida: Shadaab Siddiqie el 9 de Dic. de 2020
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);

Respuestas (1)

Shadaab Siddiqie
Shadaab Siddiqie el 9 de Dic. de 2020
From my understanding you want integrate a 2D function here is a integration resource which might help you.

Categorías

Más información sobre Time Series en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by