Convolution of a gaussian and an exponential

38 visualizaciones (últimos 30 días)
Lamees Alkiyumi
Lamees Alkiyumi el 27 de Sept. de 2022
Comentada: Paul el 27 de Sept. de 2022
Hello,
I am trying to get a fitting equation by calculating the integral of a gaussian with an exponential, however, I am unsure why matlab is giving me results with complex numbers. Any help would be appreciated.
Thanks :)
syms I0 E E0 s N0 a Emax
A = I0*exp(-(E-E0)^2/(2*s^2*pi))
A = 
B = N0*exp(-a*E0)
B = 
int(A*B,E0,-inf,Emax)
ans = 

Respuestas (1)

Paul
Paul el 27 de Sept. de 2022
Editada: Paul el 27 de Sept. de 2022
Are all of the parameters in the problem real? If so, then asserting them as such yields a simpler result.
syms I0 E E0 s N0 a Emax real
A = I0*exp(-(E-E0)^2/(2*s^2*pi))
A = 
B = N0*exp(-a*E0)
B = 
int(A*B,E0,-inf,Emax)
ans = 
Why does the Question refer to convolution? Asking because this integral is not a convolution integral, if convolution is really what is desired.
  2 comentarios
Lamees Alkiyumi
Lamees Alkiyumi el 27 de Sept. de 2022
Yes all the parameters are real.
Thanks Paul appreciate it.
I was trying to replicate the following convultion but under different limits:
What should I add for it to be a convolution integral?
Many thanks.
Paul
Paul el 27 de Sept. de 2022
Hi Lamees,
Using the notation in the linked reference, specifically in equation (3), the definition of convolution is:
given functions a(x) and b(x), their convolution is
c(y) = int(a(x)*b(y-x),x,0,inf) = int(a(y-x)*b(x),x,0,inf)
Note the argument of b in the first instance and of a in the second, and the lmits of integration, which implicitly assume that a(x) = b(x) = 0 for x < 0.
In your case, with x = E0, I think you just did
c(y) = int(a(x)*b(x),x,-inf,Emax)
That is, your equation doesn't do the "flip and slide" of b(x) (or alternatively a(x) ). Not sure what you're assuming for those limits of integration.

Iniciar sesión para comentar.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by