Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 3
    $\begingroup$ Have you tried contacting the author asking for a code since he explicitly mentions in the video that he used Mathematica? Why "reinventing the wheel" if someone already coded everything :) $\endgroup$ Commented Jun 24, 2023 at 19:54
  • $\begingroup$ @Domen: I have indeed tried to contact the author/programmer, without success. $\endgroup$ Commented Jun 25, 2023 at 3:28
  • 2
    $\begingroup$ FourierSeries gives complex coefficients. The demo is, in effect, the Fourier sine series on a odd function. Sines give a nice way to show how the height of the graph corresponds to the sum of the Fourier components. I think a real-value function can be written $\sum a_k \sin(k t + \phi_k)$, in which the components sum to the height of the graph and $a_k$, $\phi_k$ are computed from the $\pm k$ Fourier coefficients. Would that be what seek? $\endgroup$ Commented Jun 25, 2023 at 14:52
  • $\begingroup$ @Michael E2: All my target functions are real. And yes... perhaps the simplest way forward is to compute $a_k$ and $\phi_k$ from the $\pm k$ coefficients. Ideally, I'd like to enter an arbitrary periodic function (period = 1) as a potential input, e.g., SquareWave[x] + .5 TriangleWave[2 x]. $\endgroup$ Commented Jun 25, 2023 at 21:07