Hello,(adsbygoogle = window.adsbygoogle || []).push({});

I have a problem synthesising the complex Fourier series using Matlab. The time domain periodic function is:

-1, -1.0 ≤ t < -0.5

1 , -0.5≤ t <0.5

-1, 0.5 ≤ t < 1

The single non zero coefficient is: Cn = [itex]\frac{2}{\pi n}[/itex], Co is 0 (average is 0).

f(t)= [itex]\sum Cn e^{jnwt}[/itex] (limits are -∞ to ∞, could not find the latex symbol)

This makes:

f(t) = ([itex]\frac{2}{\pi}[/itex] [itex]e^{jwt}[/itex] - [itex]\frac{2}{\pi*3}[/itex] [itex]e^{j3wt}[/itex] + [itex]\frac{2}{\pi*5}[/itex] [itex]e^{j5wt}[/itex] -.... [itex]\frac{2}{\pi*∞}[/itex] [itex]e^{j∞wt}[/itex]) + ([itex]\frac{2}{\pi}[/itex] [itex]e^{-jwt}[/itex] - [itex]\frac{2}{\pi*3}[/itex] [itex]e^{-j3wt}[/itex] + [itex]\frac{2}{\pi*5}[/itex] [itex]e^{-j5wt}[/itex] -.... [itex]\frac{2}{\pi*∞}[/itex] [itex]e^{j-∞wt}[/itex])

In order to enter this in Matlab I have combined the exponential terms to obtain cosine waves.

For example when n=1 and n=-1.

[itex]\frac{2}{\pi}[/itex] [itex]e^{jwt}[/itex] + [itex]\frac{2}{\pi}[/itex] [itex]e^{-jwt}[/itex]

[itex]\frac{2}{\pi}[/itex]( [itex]e^{jwt}[/itex] + [itex]e^{-jwt}[/itex])

[itex]\frac{4}{\pi}[/itex]( [itex]\frac{e^{jwt}+e^{-jwt}}{2}[/itex])

[itex]\frac{4}{\pi}[/itex]( [itex]cos wt[/itex])

when n=2 and n=-2.

[itex]\frac{-4}{\pi*3}[/itex]( [itex]cos 3wt[/itex])

So I end up with cosine terms which only exist for odd multiples of 'n' and the '+' and '-' sign alternates.

When I enter this in Matlab I can not recreate my time domain signal. Could someone please offer me some advice on where I have gone wrong.

Jag.

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Complex Fourier Series using Matlab

Loading...

Similar Threads - Complex Fourier Series | Date |
---|---|

Complex Exponentials Signal processing | Aug 29, 2017 |

Period of a complex exponential signal | Dec 5, 2016 |

How do you work out simultaneous eqns w/ complex numbers & phasor | Nov 16, 2016 |

Complex Fourier series of | Oct 12, 2011 |

Complex Fourier Series | Nov 25, 2010 |

**Physics Forums - The Fusion of Science and Community**