DSPRelated.com
Forums

A problem on FFT

Started by pram...@gmail.com December 19, 2004
Hi,

Could anyone give solution to this problem ?

Write a program to compute the 128 point FFT for the signal, x(n) =
cos(n *pi)/2.Also plot the  FFT spectra.
any pointer would be helpful

Thanks
Pramod

pramodchowda@gmail.com wrote:

> Hi, > > Could anyone give solution to this problem ? > > Write a program to compute the 128 point FFT for the signal, x(n) = > cos(n *pi)/2.Also plot the FFT spectra. > any pointer would be helpful > > Thanks > Pramod >
But you only have one frequency? f=1/4 cycle/sample so that is your spectra. you can use matlab fft(). are you being asked to code fft function itself from scratch?
pramodchowda@gmail.com wrote:

> Hi, > > Could anyone give solution to this problem ? > > Write a program to compute the 128 point FFT for the signal, x(n) = > cos(n *pi)/2.Also plot the FFT spectra. > any pointer would be helpful > > Thanks > Pramod
Homework? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
"Fred" <Fred@nowhere.com> wrote in message
news:Ghfxd.495$yV1.279@newssvr14.news.prodigy.com...
> pramodchowda@gmail.com wrote: > > > Hi, > > > > Could anyone give solution to this problem ? > > > > Write a program to compute the 128 point FFT for the signal, x(n) = > > cos(n *pi)/2.Also plot the FFT spectra. > > any pointer would be helpful > > > > Thanks > > Pramod > > > > But you only have one frequency? > > f=1/4 cycle/sample > > so that is your spectra. > > you can use matlab fft(). are you being asked to code fft function > itself from scratch?
Could be the trick question to encourage "thinking before coding".
> But you only have one frequency? > > f=1/4 cycle/sample > > so that is your spectra.
The signal is windowed by a 128 sample long window, this will make the FFT different from a single frequency value.
Is Google groups turning into some sort of online homework assistance?

On 19 Dec 2004 19:05:13 -0800, "S A kumar" <arun.sakumar@gmail.com>
wrote:

>Is Google groups turning into some sort of online homework assistance?
Or something like that. I have noticed that the quality of some the questions is going way down, close to the point of handholding. I get the impression that some folks are posting questions before even thinking about it enough to frame the question clearly. It is a little tough sometimes to assess how much of that is due to a language barrier, though. Eric Jacobsen Minister of Algorithms, Intel Corp. My opinions may not be Intel's opinions. http://www.ericjacobsen.org
<pramodchowda@gmail.com> wrote in message 
news:1103459121.614956.308770@f14g2000cwb.googlegroups.com...
> Hi, > > Could anyone give solution to this problem ? > > Write a program to compute the 128 point FFT for the signal, x(n) = > cos(n *pi)/2.Also plot the FFT spectra. > any pointer would be helpful > > Thanks > Pramod >
Hi Pramod your input signal is a repetition of -0.5 , +0.5 to fill yor fft ( or +0.5, -0.5 if you start with n=0). Best of luck - Mike