FOURIER COEFFICIENTS PROGRAM
Revised:
Author
Within each segment, we use 1000 points in order to produce a smooth plot.
nterms_ak : represents number of fourier coefficients ak and bk.
Purpose
In this program, the given periodic function f(t) will be approximated by Fourier (sine and cosine)
series. The program will compute the fourier coefficients a0, a1......a8 (assuming n_terms = 8,
since it is unneccessary to use more fourier terms ), b1........b8.
The function provided by the user can have from "1" upto "4" segments.
The user only has to define the following parameters.
nsegment = ?
Lower and upper time integration limit for each segment = ?
Define the corresponding function = ?
The following worksheet provides four examples for which the given function can be defined by
1,2,3 and 4 segments, respectively.
with each segment represented in the given fashion: