Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 834 Bytes

README.md

File metadata and controls

13 lines (8 loc) · 834 Bytes

Fourier Series Approximation

A Python program to approximate a given function using Fourier series expansion. The FourierSeries class calculates Fourier coefficients and provides a visual approximation of the function based on the given number of terms.

Features

  • Approximates functions using Fourier series.
  • Supports customizable terms for Fourier expansion.
  • Visualizes the approximation against the target function.

Important Note

All the target functions must be periodic with a period of 2π. For me sawtooth and triangular wave was tough to generate. So, I added an explanation of how I generated them in the code. I only provided the explanation for the triangular wave here. If you understand how to generate the triangular wave, you can easily generate the sawtooth wave.