Numerical Evaluation of Fourier Series Code

Previous: The Fourier Series for a Complicated Function
Fourier Series List

The code to find the Fourier Coefficients numerically is given. The specific function evaluated comes from the complicated example page.

Using Matlab, the code is given in Figure 1.

matlab code for Fourier Series

Figure 1. The Matlab Code for the Fourier Series Coefficients.

Note that the discrete integrals are simply found from summing up the value of the function, weighted by delT, which is similar to dT in the continuous form of the integral.

Previous: Fourier Series Example - A Complicated Function

Fourier Series Table of Contents

The Fourier Transform (Home)