From: Coloradomath Smith on
Hello everyone,

I need to check my hand calculations of the coefficients for a fourier series.

The function is as follows:

f(x)= x 0<x<=1
f(x)=1 1<x<2

Can anyone give me an example of how to get the fourier coefficients (i.e. A0, An, and Bn) for this non-periodic function in matlab so that I can compare them to my hand calcs? I'm thinking maybe FFT but I'm not for sure how to do this.

Thanks,