Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
xdomain = Table[i , {i, -10, 10, .1}];
  Fourier[E^-#^2 & /@ xdomain]*E^#^2 & /@ xdomain]]

So I want to numerically fourier transform a function, multiply that fourier'd function by a second function, and then inverse fourier transform it.

The code above doesn't work. I get a blank graph, I think, because it doesn't properly multiply the two vectors that I commanded to multiply. I'm not sure why I can't get {a,b,c}*{1,2,3} to multiply inside my fourier function, but I have tried putting evaluate functions in different spots inside to see if that would fix it.

share|improve this question
  1. You need brackets around E^#^2 & /@ xdomain
  2. ListPlot plot only real lists so you need to apply Re, Im or Abs
  3. E^-#^2 & /@ xdomain is overkill. Just Exp[-xdomain^2]

    xdomain = Range[-10, 10, 0.1];
    ListPlot[Re@InverseFourier[Fourier@Exp[-xdomain^2] Exp[xdomain^2]]]

enter image description here

P.S. It seems that you want to apply a deconvolution. The method with the inverse Fourier transform is unstable. For this purpose there is a stable build-in function ListDeconvolve.

share|improve this answer
Thanks for the help. Do you think you could help me out with using ListDeconvolve in this context? I cannot find very much material on it's use. How do I know what method and kernel I should use to deconvolve the system? – Steven Sagona Oct 20 '13 at 3:56
@StevenSagona It depends on the system. Your kernel is Gaussian so GaussianMatrix should be a good choice. For 1D system you can use it as GaussianMatrix[{{r}, {σ}}] where σ is a standard deviation and r is a radius of the kernel (must be several times more than σ). – ybeltukov Oct 20 '13 at 10:51

Oneliners can be elegant, but sometimes they burdens Mathematica a bit too much. Let's do it one step at the time:

xdomain = Table[i, {i, -10, 10, .1}];
F1= E^-#^2 & /@ xdomain; (* no problem here *)
F2 = E^+#^2 & /@ xdomain; (* no problem here *)
ftot=InverseFourier[Fourier[F1]*F2]; (* no problem here *)

The problem, then, is not in the multiplication. So, where is it? Well, the problem is that ftot is a complex function. You can plot its magnitude, its phase or its real and imaginary part. But if you try to listplot it as it is, you will get a blank graph. Perhaps you want:


Mathematica graphics



Mathematica graphics

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.