Tag Info

New answers tagged


If I estimate your data you have a time increment of 0.01 and a frequency of about 0.5 Hz. Thus dt = 0.01; f0 = 0.5; data = N@Table[ 1000 + 10 Sin[2 \[Pi] f0 (n - 1) dt] + RandomReal[{-3, 3}], {n,3000}]; ListLinePlot[data] Now we take the Fourier transform and also generate a frequency axis. Plotting on a log scale and also plotting with the ...


Your problem lies in your use of PlotRange. Given a one-dimensional list as input Fourier returns a one-dimensional list as output. This list is considered a set of y-values only if plotted by ListPlot, which takes the x-values to be the consecutive integers 1, 2, 3 ... With your plot range specification of {0, 0.07} for the x-range you create a problem. ...


Details of the frequency and axis and how Fourier is scaled may be found here. This could be what you want. I will work with explicit abscissa rather than using DataRange. I start by generating your data but include the time values. dt = 0.01; list = Table[{t, Cos[t]}, {t, 0, 100 - dt, dt}]; ListLinePlot[list, Joined -> True] I now take the ...


I think you are mixing up angular frequency $\omega$ and linear frequency $f$. The frequency of your Sin signal is $f=1/2\pi$. Change to DataRange->{0,2 Pi 10000/100} and the spectrum ListPlot has a peak at 1.0. The discrete FT pairs time $t$ with $f$, not with $\omega$. See the first line in Details and Options in Fourier.


A similar question was recently raised on Wolfram Community. http://community.wolfram.com/groups/-/m/t/528474?p_p_auth=33hR9Jgo One of my responses there showed how one might code up a (reasonably) numerically stable version of Prony's method to recover frequencies. I'll do similar with this example. Repeat the setup: sr = 400;(*sample rate*) nn = ...


First, I have a few improvement suggestions for your Fourier code: The bright vertical and horizontal lines you see in your Fourier image are the sharp gradients at the borders of the image (because the Fourier transform assumes a periodic image). So you should get rid of the black border at the bottom: img = Import["http://i.stack.imgur.com/bIUkE.png"]; ...


Why don't you use NFourierSeries? << FourierSeries` f[t_] = Cos[t] + 0.2*Sin[2*t] + Piecewise[{{.1, 1 < Mod[t, 2 Pi] < 2}}, 0]; NFourierSeries[f[t], t, 3]; // AbsoluteTiming {3.39228, Null} This time is measured on my laptop!

Top 50 recent answers are included