0

I've been trying to plot the numerical convolution between a gaussian and another function in IDL, with poor results.

So far I tried using the functions convol and convolve in the following way:

pro num_convolution

  dist = findgen(4000.)/100. - 20.
  
  imconv = convolve( simple_sol(dist, 3.), gauss_func(dist))
  
  window, 0
  plot, dist, imconv, xrange=[-5,20]


  stop
end


function simple_sol, x_, t
  ; returns plasma frequency
  w_pe=1.4e9
  n0 = 6e8
  nb=12.
  d=3e9
  u_0=1e10
  u0=u_0/d
  v_min=0.4*u0
  D_0=!pi*nb*w_pe/(n0*(u0-v_min))
  Dxx = (u0+v_min)*((u0+v_min)*alog(u0/v_min)/(u0-v_min)  - 2)/(4*D_0)
  return, 1./((x_-t*(u0+v_min)/2.)^2./(2.*Dxx*nb*t) + 2.*!pi^2.*Dxx*nb*t)
end

function gauss_func, x_
  ; returns plasma frequency
  return, exp(-x_^2)
end


Any idea what I could be doing wrong? Thanks in advance for the help :)

0 Answers0