Hi everybody,
I have a time domain semi sinusoidal waveform stored in excell file in numerical format. Coul you please tell me how can I do FFT on that?
Regards,

 채택된 답변

Image Analyst
Image Analyst 2012년 2월 19일

0 개 추천

The xlsread() and fft() functions immediately spring to mind. Did you try them?

댓글 수: 3

Alzapoa
Alzapoa 2012년 2월 19일
Thands a lot. they work, but the fft() just do a numerical calculation could you tell me how to plot the elements. I tried the plot() command but it's just look like a line not a spectrum.
regards,
Wayne King
Wayne King 2012년 2월 20일
If xdft is the output of fft, then plot(abs(xdft)). The reason that plot(xdft) doesn't look right is because the output of fft() is in general complex-valued (as it should be).
Image Analyst
Image Analyst 2012년 2월 22일
If the plot of the spectrum doesn't look like a line plot, what's it supposed to look like? You can use bar() if you want - would that be better? Of course you have to take either the real, imaginary, or magnitude like Wayne said. You might also want to plot the log of the amplitude if your signal looks just like one giant sharp spike, like it should for a mostly sinusoidal signal.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

질문:

2012년 2월 19일

편집:

2013년 10월 20일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by