Fourier series in Python - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Fourier series in Python (/thread-36682.html) |
Fourier series in Python - Armandito - Mar-18-2022 Hello everyone, I'm new here so I hope I'm in the right place to ask some questions ! I would like to get the equation of the Fourier series of a (complex) curve. There are a few scripts on the internet that plot the Fourier series curve at different orders, but none of them give the equation (or work). I looked for an existing function but it doesn't seem to exist ..... I have linked to this post a screenshot of a curve that I would like to get the Fourier series. As you can see, I can plot the curve, but I don't get the equation. For those who know MatLab, I'm looking for a function like the "fit" function : https://fr.mathworks.com/help/curvefit/fourier.html I hope that my post was clear enough ! :) Thanks for your help ! RE: Fourier series in Python - Larz60+ - Mar-18-2022 see: https://docs.scipy.org/doc/scipy/tutorial/fft.html and: https://numpy.org/doc/stable/reference/generated/numpy.fft.fft2.html RE: Fourier series in Python - Armandito - Mar-18-2022 (Mar-18-2022, 09:45 AM)Larz60+ Wrote: see: https://docs.scipy.org/doc/scipy/tutorial/fft.html Maybe I don't get it, but those links are the FFT, and I'm looking for Fourier series (maybe we can get the Fourier series from the FFT ?) RE: Fourier series in Python - Larz60+ - Mar-18-2022 Armandito Wrote:Maybe I don't get it, but those links are the FFT, and I'm looking for Fourier series Confused (maybe we can get the Fourier series from the FFT ?) From difference between.org: Quote:Difference between Fourier Series and Fourier Transform I used fft in my work many years ago (almost 30) while working R & D in spectra-chemical instrumentation design and honestly can't remember enough to properly answer your question. |