Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Stuck in fourier series !!!!

Subject: Stuck in fourier series !!!!

From: Animesh Pandey

Date: 27 Feb, 2011 15:55:06

Message: 1 of 4

I have been stuck on finding the fourier series of a square wave using symbolic toolbox ....
yet i have jus been able to plot the square wave !!!!
Please give a hint or a code snippet or anything helpful by which I could start !!!
ASAP
Thnx !!!

Subject: Stuck in fourier series !!!!

From: ImageAnalyst

Date: 27 Feb, 2011 16:18:20

Message: 2 of 4

On Feb 27, 10:55 am, "Animesh Pandey" <apanimesh...@gmail.com> wrote:
> I have been stuck on finding the fourier series of a square wave using symbolic toolbox ....
> yet i have jus  been able to plot the square wave !!!!
> Please give a hint or a code snippet or anything helpful by which I could start !!!
> ASAP
> Thnx !!!

------------------------------------------------------
Well I don't have that toolbox so I can't help with that. But there
have been a lot of questions about Fourier lately, so I just thought
I'd use the opportunity to mention that Academic Earth has lectures
from professors at top universities on Fourier transforms, in case
anyone is interested:

A semester's worth of lectures on the Fourier Transform from Stanford:
http://academicearth.org/courses/the-fourier-transform-and-its-applications

A lecture on Fourier Series from MIT:
http://academicearth.org/lectures/measure-fourier-series-and-transform

Lots more lectures online there on a wide variety of topics, science/
engineering related and otherwise. (Sadly, none yet on image
analysis).
ImageAnalyst

Subject: Stuck in fourier series !!!!

From: Nasser M. Abbasi

Date: 27 Feb, 2011 16:27:10

Message: 3 of 4

On 2/27/2011 7:55 AM, Animesh Pandey wrote:
> I have been stuck on finding the fourier series of a square wave using symbolic toolbox ....
> yet i have jus been able to plot the square wave !!!!
> Please give a hint or a code snippet or anything helpful by which I could start !!!
> ASAP
> Thnx !!!

I looked at the symbolic toolbox help, and I did not find a
command to do what you want. I think the Maple extended symbolic
toolbox might do it, but not sure now. I only have the basic
syms.

I know that Mathematica has such a command. Try Wolfram ALpha web
site, it is free, may be it will accept the command you type becuase it
does accept many Mathematica commands. SOmething to try.

The command I did now on my PC to find FourierSeries, 2 terms
is the following:


In[7]:= FourierSeries[SquareWave[x],x,2]//Simplify//ExpToTrig

Out[7]= -(1/(2 \[Pi]))I (1-Cos[1/2]+Cos[2]-Cos[5/2]+Cos[3]-Cos[9/2]+
Cos[5]-I Sin[1/2]+I Sin[2]-I Sin[5/2]+I Sin[3]-I Sin[9/2]+I Sin[5]) (Cos[2 (3+x)]-
I Sin[2 (3+x)]) (-1-Cos[1/2]+Cos[3]+2 Cos[7/2]+Cos[4]-Cos[13/2]-Cos[7]+Cos[4 x]+
2 Cos[3 (1+x)]-Cos[4 (1+x)]-2 Cos[3+x]-2 Cos[4+x]+2 Cos[4+3 x]+Cos[1/2+4 x]-
Cos[3+4 x]-2 Cos[7/2+4 x]+Cos[13/2+4 x]+Cos[7+4 x]-I Sin[1/2]+I Sin[3]+
2 I Sin[7/2]+I Sin[4]-I Sin[13/2]-I Sin[7]+I Sin[4 x]+2 I Sin[3 (1+x)]-
I Sin[4 (1+x)]-2 I Sin[3+x]-2 I Sin[4+x]+2 I Sin[4+3 x]+I Sin[1/2+4 x]-
I Sin[3+4 x]-2 I Sin[7/2+4 x]+I Sin[13/2+4 x]+I Sin[7+4 x])

So, type the above command on that website to see if it will work.

good luck,
--Nasser

Subject: Stuck in fourier series !!!!

From: Animesh Pandey

Date: 28 Feb, 2011 06:30:21

Message: 4 of 4

@Nasser and Image analyst

thank you for ur help !!!

By symbolic toolbox I mean, I wish to use 'syms' or 'int' ...... to compute my calculations.
I want to use 'int' to calculate the fourier coefficients of a square wave !!!!
And then use pretty() to print the expression !!!

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us