# Tag Info

2

The Gaussian f[x] you are transforming is given by your PDF statement. The corresponding frequency-domain Gaussian is given by FourierTransform[f[x], x, w] which is the same function with w replacing x, that is, f[w]. The discrete Fourier transform on numerical data, implemented by Fourier, assumes periodicity of the input function. Hence, the Testdata ...

2

Thanks for a complete answer bill and Ziofil. Adding further to your answer, In case of a 2D Fourier Transform of an image: Case1: ImagePeriodogram[image] would give you the Fourier Transform of the input image right answer, with DC centered in the middle of the resultant image. Case2: scaledPower = Image[PeriodogramArray[image]] would give you the ...

6

How to make the numerical Fourier transform match up exactly with the analytical one? I'll just work a 1-dimensional example here, but it should apply in 2D as well. We take a Gaussian pulse whose phase is zero at time zero, and it should have a completely real and positive Fourier transformation pulse[t_] := Exp[-t^2/ (2 σ^2)] Exp[-I ω0 t]; pulseω = ...

9

This is the best I can come up with, I'm very interested to see if anyone else has a better solution. The idea here is to just run through values of $t$, and do a DFT on $$E(t+\frac{\tau}{2}) E ^*(t-\frac{\tau}{2})$$ So I set up the time/frequency resolution for my DFT, using a dt value I know gives a broad enough spectrum, dt = 0.025; num = 2^14; df = ...

11

Here's how to find the Fourier transform numerically (for a bandlimited signal). Define the function (signal) of interest: x[t_] := Exp[-t^2] Cos[50 t - Exp[-2 t^2] 8 \[Pi]]; Define the observation interval (this is necessarily finite, I used the values in your plot): {ti, tf} = {-2, 2}; Now, we sample the signal with an appropriate sampling period ...

17

It always takes me a while to remember the best way to do a numerical Fourier transform in Mathematica (and I can't begin to figure out how to do that one analytically). So I like to first do a simple pulse so I can figure it out. I know the Fourier transform of a Gaussian pulse is a Gaussian, so pulse[t_] := Exp[-t^2] Cos[50 t] Now I set the timestep ...

3

This is not the exhaustive answer, but the first step to it, after which you can proceed yourself, if you like this numerical approach. Try this: f[t_] := Exp[-t^2] Cos[50 t - Exp[-2 t^2] 8 \[Pi]]; tab = Table[ NIntegrate[f[t]*Cos[k*t], {t, 0, \[Infinity]}, Method -> {"LevinRule", Method -> {"GaussKronrodRule", ...

1

I too am not clear what you want. I think you may need to use FourierParameters correctly. I will give you an illustration using your example. nn = 250; T = 20.; t = Range[0, T, T/nn]; f = Exp[-(t - 5)^2]*Sin[t - 5]; I will now work out the mean square value of the time values f.f/Length[f] (* 0.0122794 *) Now we take the Fourier transform and use ...

0

I think you want to pad to the left with zeros. The slight alterations below might put you closer to what you want. dt = 0.05; t1 = Range[0, 10, dt]; t = Join[Reverse[-Rest[t1]], t1]; fun1 = Exp[-1 t1]*Sin[2. t1]; (* Use the nonnegative values here *) fun = PadLeft[fun1, 2*Length[fun1] - 1]; (* Now pad on the negative side with zeroes *) (* The purpose here ...

1

Without seeing your data and the output of FindPeaks, it is hard to say why the function does not work (it worked for me), but I wrote this simple function that will return the positions of peaks in an array: peaks = Flatten[Position[Differences[Differences[array]], -2]] + 1 Given: array = {0, 1, 2, 3, 4, 3, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 1, 1}; ...

2

I would try with the Select function. If your data is a list of pairs (freq,amp) then the code you would need would be something like: Select[data,#[[2]]>xx&] Where data is the list of pairs and xx is the threshold value. Since the spectrum would have a finite number of peaks as would be clear by looking into the plot, you can choose the xx value ...

8

One way to avoid the singularity in 0-th coefficient is to regularize the original function. The problem is due to it being a polynomial, which is why we get powers of n in denominator by partial integration - the procedure that is obviously failing for the 0-th harmonic. Obviously this is a shortcoming for the current way Mathematica computes Fourier ...

Top 50 recent answers are included