Skip to main content
13 events
when toggle format what by license comment
Jun 4, 2021 at 17:03 vote accept rdx
Jun 4, 2021 at 16:22 vote accept rdx
Jun 4, 2021 at 16:23
Jun 4, 2021 at 14:00 history edited Hugh CC BY-SA 4.0
tidy up
Jun 4, 2021 at 13:28 history edited Hugh CC BY-SA 4.0
Added more at the request of the OP
Jun 4, 2021 at 13:14 comment added rdx - Thanks @Hugh !
Jun 4, 2021 at 12:53 comment added Hugh @rdx I think I can do it. I have an out-by-one error at the moment but stand-by.
Jun 3, 2021 at 19:50 comment added rdx @Hugh - Would Mathematica be able to write beneath that graph the FT/FS in written form? I.e. y=(trig function 1) + (trig function 2) etc. ?
Jun 3, 2021 at 17:12 comment added Hugh @rdx Yes these are the magnitude and phase of each Fourier component. You might like to work with the real and imaginary parts of the Fourier components and not take their magnitude and phase. See here for some notes on how Fourier works.
Jun 3, 2021 at 16:50 comment added rdx @Hugh - thanks. That last graph you’ve drawn, if I’ve understood correctly is the components of the Fourier series for example sin(x) + sin (3x)/3 + ... etc. ?
Jun 3, 2021 at 16:45 comment added Daniel Lichtblau (3) Whether this type of smoothing makes sense is a question I cannot answer though. Outside my expertise and also it probably depends on the underlying problem that needs solving.
Jun 3, 2021 at 16:44 comment added Daniel Lichtblau (2) Then do: ifunc = Interpolation[Transpose[{smoothtimes, smoothvals}], InterpolationOrder -> 1]; Plot[ifunc[t], {t, .01, per - .01}] and perhaps ft = Fourier[Table[ifunc[t], {t, .01, per - .01, .001}]]; ListPlot[Abs@ft]
Jun 3, 2021 at 16:43 comment added Daniel Lichtblau (1) I did something similar before I saw this, just to see if a smoothed version of the data looked plausible. This is a bit clunky, but... {times, vals} = Transpose@data; foldtimes = foldTimes[times, per]; newdata = SortBy[Transpose[{foldtimes, vals}], First]; kern = {1, 2, 3, 4, 5, 4, 3, 2, 1}/25; {newtimes, newvals} = Transpose@newdata; smoothvals = ListConvolve[kern, newvals]; smoothtimes = newtimes[[5 ;; -5]];
Jun 3, 2021 at 16:20 history answered Hugh CC BY-SA 4.0