Fourier series

Author: Ammar Abul-Feilat

This is a simple implementation of the Fourier series. The code is written in JS and uses the following libraries:

Usage

The code is written in JS and can be run in any browser. To run the code, simply open the index.html file in your browser. The code can also be run using a local server

Examples

The following are some examples of the output of the code:

Example 1

Note: visualize a Fourier series for a square wave in JavaScript with p5.js , the equation for the Fourier series is given by:

f(x)= 4/π ∑n=1,3,5...∞1n sin(nπx)

References