- #1
exidez
- 44
- 0
Fourier Series: How do i simplify this integral?
http://img18.imageshack.us/img18/4586/matlabfouriercomplex.jpg
[tex]
g(t)=\sum_{n=-\infty}^{\infty}c_{n}e^{jn \omega t}[/tex]
[tex]
c_{n}=\frac{1}{T}\int_{t_{0}}^{t_{0}+T}g(t)e^{-jn \omega T}
[/tex]
I need to find the complex Fourier series of the above function extended as an odd function
I Just want to know how to simplify the final solution i have. So far i have
[tex]
c_{n}=\frac{1}{T}\int_{t_{0}}^{t_{0}+T}g(t)e^{-jn \omega T}
[/tex]
[tex]
c_{n}=\frac{1}{T}(\int_{-T/10}^{0}-Ae^{-jn \omega T}dt + \int_{0}^{T/10}Ae^{-jn \omega T}dt)[/tex]
[tex]
c_{n}=\frac{A}{T}( \frac{1}{jn \omega } - \frac{e^{(jn \omega T/10)}}{jn \omega } - \frac{e^{(-jn \omega T/10})}{jn \omega } + \frac{1}{jn \omega})[/tex]
[tex] \omega = \frac{2 \pi }{T}[/tex]
[tex]
c_{n}=\frac{A}{jn2 \pi }(2 - e^{(jn2 \pi /10)} - e^{(-jn2 \pi /10)})[/tex]
Now if i put this in MATLAB i will put
for n = -N:??:N, % loop over series index n
cn = A/(j*n*2*pi)*(2-exp(j*n*(pi/5))-exp(-j*n*(pi/5))); % Fourier Series Coefficient
yce = yce + cn*exp(j*n*wo*t); % Fourier Series computation
end
I don't know what to incriment N by.. All the other Fourier examples i have done have been in the form:
[tex]c_{n}=\frac{1}{jn \pi }(1 - e^{(jn \pi )})[/tex]
Here i understand [tex](1 - e^{(jn \pi )})[/tex] will be 0 when n is even 2 when n is odd
Hence the series becomes:
[tex]
\sum_{n=odd}^{\infty}\frac{2}{ \pi jn}e^{jn \omega t}[/tex]and the loop will go:
for n = -N:2:N, % loop over series index n (odd)
cn = 1/(j*n*pi)*(1-exp(j*n*pi)); % Fourier Series Coefficient
yce = yce + cn*exp(j*n*wo*t); % Fourier Series computation
endBut what is it for my example? It is not so straight forward. Can it be simplified like above? How do i progress from here?
Homework Statement
http://img18.imageshack.us/img18/4586/matlabfouriercomplex.jpg
Homework Equations
[tex]
g(t)=\sum_{n=-\infty}^{\infty}c_{n}e^{jn \omega t}[/tex]
[tex]
c_{n}=\frac{1}{T}\int_{t_{0}}^{t_{0}+T}g(t)e^{-jn \omega T}
[/tex]
The Attempt at a Solution
I need to find the complex Fourier series of the above function extended as an odd function
I Just want to know how to simplify the final solution i have. So far i have
[tex]
c_{n}=\frac{1}{T}\int_{t_{0}}^{t_{0}+T}g(t)e^{-jn \omega T}
[/tex]
[tex]
c_{n}=\frac{1}{T}(\int_{-T/10}^{0}-Ae^{-jn \omega T}dt + \int_{0}^{T/10}Ae^{-jn \omega T}dt)[/tex]
[tex]
c_{n}=\frac{A}{T}( \frac{1}{jn \omega } - \frac{e^{(jn \omega T/10)}}{jn \omega } - \frac{e^{(-jn \omega T/10})}{jn \omega } + \frac{1}{jn \omega})[/tex]
[tex] \omega = \frac{2 \pi }{T}[/tex]
[tex]
c_{n}=\frac{A}{jn2 \pi }(2 - e^{(jn2 \pi /10)} - e^{(-jn2 \pi /10)})[/tex]
Now if i put this in MATLAB i will put
for n = -N:??:N, % loop over series index n
cn = A/(j*n*2*pi)*(2-exp(j*n*(pi/5))-exp(-j*n*(pi/5))); % Fourier Series Coefficient
yce = yce + cn*exp(j*n*wo*t); % Fourier Series computation
end
I don't know what to incriment N by.. All the other Fourier examples i have done have been in the form:
[tex]c_{n}=\frac{1}{jn \pi }(1 - e^{(jn \pi )})[/tex]
Here i understand [tex](1 - e^{(jn \pi )})[/tex] will be 0 when n is even 2 when n is odd
Hence the series becomes:
[tex]
\sum_{n=odd}^{\infty}\frac{2}{ \pi jn}e^{jn \omega t}[/tex]and the loop will go:
for n = -N:2:N, % loop over series index n (odd)
cn = 1/(j*n*pi)*(1-exp(j*n*pi)); % Fourier Series Coefficient
yce = yce + cn*exp(j*n*wo*t); % Fourier Series computation
endBut what is it for my example? It is not so straight forward. Can it be simplified like above? How do i progress from here?
Last edited by a moderator: