I followed the formulas we were given by the lecturers and I think I'm doing something wrong. I am trying to do a fourier series approximation of the function s(t)=1-e^(-5t) for the interval from 0 to 1.5. We were given a matlab code to test our term. As per the equations we were given by the lecturer I just needed to calculate the term Cn. But I think I did something wrong that I'm missing in trying to compute the integral to calculate the term Cn. The matlab script needs to inputs : the values of Cn and f0 which is the fundamental frequency. In this case the fundamental frequency is 2/3.
Cn is an array containing the various values of Cn for various nth harmonics between a certain interval x like -x<n<x. For the matlab input I tried a range
of about -800<n<800. n is an integer. the plot from matlab does not match the plot of the original function between the interval 0 to 1.5. So I reckon I'm calculating the Cn term wrong. I have attached the necessary details.
Apologies if I missed anything. Let me know if there is more details you'd like to know. But I just need to know if I'm doing something with the integral workings I attached here.
Cn is an array containing the various values of Cn for various nth harmonics between a certain interval x like -x<n<x. For the matlab input I tried a range
of about -800<n<800. n is an integer. the plot from matlab does not match the plot of the original function between the interval 0 to 1.5. So I reckon I'm calculating the Cn term wrong. I have attached the necessary details.
Apologies if I missed anything. Let me know if there is more details you'd like to know. But I just need to know if I'm doing something with the integral workings I attached here.
Attachments
-
246 KB Views: 13
-
2.5 MB Views: 6
Last edited: