I obtained the attached m-file from MATLAB Central that demonstrates GIBBS phenomenon. I modified the code to track the sum of the squared differences denoted by the variable err. I carried out the Fourier series to 1000 terms. I varied the parameter N which varies the time step. In the pdf file are my plots. The 2nd plot is err vs 1 to C which represents the number of terms in the Fourier series. I plotted 3 cases for N=101, 1001, & 10001.
It appears err flattens out around 0.5 if N is too small. I believe this is due to the time step is not small enough to track the higher harmonics of the Fourier series. Is there anyone out there know why the value is 0.5 or know of any informative literature on this effect?
Appreciate any response
Best Answer