问题标签 [continuous-fourier]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - Plot Math's Fourier Basis Functions w/o Prebuilt Fourier Py Functions
I was looking to plot the Fourier Series values, in time, for k = 0,1,2,3.
The goal is to plot each signal separately, then a sum of all four plots. I am not calculating the coefficients.
I am looking to expand this to sampling and how the signal breaks down when the sampling rate is less than twice the max frequency. So, a manual approach I take. No sympi or other package.
I can plot when creating the signals and plots manually. (Though I think there's something off with this plot)
I am running into trouble when trying to create a loop. Any help is appreciated.
Manually plotting the sum only:
Creating a for
loop, setting a list, and using sum()
; I can plot each signal and the sum:
But the plot is backwards. What did I do wrong, and is there a better way to do this?