- #1
haydez98
- 9
- 0
fourier series - trig and complex not matching?
i am given a signal which can be written as:
s(t) = -1 {-1 < t < 0}, 1 {0 < t < 1}, 0 {1 < t < 2} [it's a pulse train]
the period, T, is 3.
i have calculated the trig. Fourier series representation, which in MATLAB turns out to be correct, yet when i calculate the exponentical fsr, i get a version of the trig. fsr which has its amplitude halved.
for the trig fsr:
s(t) = 2/(pi * n) * (1 - cos((2 * pi * n)/3)) * sin((2 * pi * n * t)/3);
for the exp fsr:
s(t) = -1/(i * pi * n) * (cos((2 * pi * n)/3) - 1) * exp((i * 2 * pi * n * t)/3)
i also tried
c_n = 0.5 (a_n - i * b_n) = -0.5 * i * ( 2/(pi * n) * (1 - cos((2 * pi * n)/3))
either case, my complex fsr was a scaled amplitude version of my trig fsr...when i get rid of the 0.5 it turns out to be right, but why would i get rid of the 0.5?
thanks in advance
i am given a signal which can be written as:
s(t) = -1 {-1 < t < 0}, 1 {0 < t < 1}, 0 {1 < t < 2} [it's a pulse train]
the period, T, is 3.
i have calculated the trig. Fourier series representation, which in MATLAB turns out to be correct, yet when i calculate the exponentical fsr, i get a version of the trig. fsr which has its amplitude halved.
for the trig fsr:
s(t) = 2/(pi * n) * (1 - cos((2 * pi * n)/3)) * sin((2 * pi * n * t)/3);
for the exp fsr:
s(t) = -1/(i * pi * n) * (cos((2 * pi * n)/3) - 1) * exp((i * 2 * pi * n * t)/3)
i also tried
c_n = 0.5 (a_n - i * b_n) = -0.5 * i * ( 2/(pi * n) * (1 - cos((2 * pi * n)/3))
either case, my complex fsr was a scaled amplitude version of my trig fsr...when i get rid of the 0.5 it turns out to be right, but why would i get rid of the 0.5?
thanks in advance