 | | From: | Shafik | | Subject: | The FFT of a complex exponential | | Date: | 18 Jan 2005 15:07:30 -0800 |
|
|
 | Consider this in matlab:
x = exp((j*2*pi*[0:(360)])/360) // complex exponential plot(abs(fftshift(fft(x))))
How come the plot resembles a DC time-signal? The spectrum is a spike at freq 0. I would expect a single spike somewhere else. What's wrong?
--Shafik
|
|
 | | From: | Bhaskar Thiagarajan | | Subject: | Re: The FFT of a complex exponential | | Date: | Tue, 18 Jan 2005 16:09:54 -0800 |
|
|
 | "Shafik" wrote in message news:1106089650.814559.70110@z14g2000cwz.googlegroups.com... > Consider this in matlab: > > x = exp((j*2*pi*[0:(360)])/360) // complex exponential
What is the equation for a complex exponential - e^(j*w*t) or e^(j*2*pi*f*t) right? Now match your matlab implementation to this and see where your problem is. Don't forget to translate this continuous time equation to a discrete form.
> plot(abs(fftshift(fft(x)))) > > How come the plot resembles a DC time-signal? The spectrum is a spike > at freq 0. > I would expect a single spike somewhere else. What's wrong? > > --Shafik >
|
|
 | | From: | dirkman at erols.com | | Subject: | Re: The FFT of a complex exponential | | Date: | 18 Jan 2005 20:02:13 -0800 |
|
|
 | Shafik wrote: > Consider this in matlab: > > x = exp((j*2*pi*[0:(360)])/360) // complex exponential > plot(abs(fftshift(fft(x)))) > > How come the plot resembles a DC time-signal? The spectrum is a spike > at freq 0. > I would expect a single spike somewhere else. What's wrong? > > --Shafik
I think if you put just DC in 'x' you will find the energy in the bin next to what you got for your signal. It would be easier for you to interpret your results if you left out the 'fftshift' temporarily. Also, to get all of the energy in one bin replace 0:360 with 0:359. Dirk Bell DSP Consultant
|
|
 | | From: | ajith_pc at yahoo.com | | Subject: | Re: The FFT of a complex exponential | | Date: | 18 Jan 2005 21:05:20 -0800 |
|
|
 | Hi,
Check the Bhaskar's reply. Try to identify the following. What is the frequency of the complex exponential? What is the sampling frequency?
Try some thing like
x = exp((j*2*pi*[0:(360)])/360); x_f = abs(fft(x)); xf = (0:length(x_f)-1)'*360/length(x_f); figure;plot(xf,x_f),xlabel('Hz')
And try to answer the above questions.
regards, ajith
dirk...@erols.com wrote: > Shafik wrote: > > Consider this in matlab: > > > > x = exp((j*2*pi*[0:(360)])/360) // complex exponential > > plot(abs(fftshift(fft(x)))) > > > > How come the plot resembles a DC time-signal? The spectrum is a spike > > at freq 0. > > I would expect a single spike somewhere else. What's wrong? > > > > --Shafik > > I think if you put just DC in 'x' you will find the energy in the bin > next to what you got for your signal. It would be easier for you to > interpret your results if you left out the 'fftshift' temporarily. > Also, to get all of the energy in one bin replace 0:360 with 0:359. > Dirk Bell > DSP Consultant
|
|