How to plot fft in MATLAB from the given x and y values in text format using rectangular windowing?

Hello,
I am new in MATLAB. I am having a data base which contains 2048 , x values correspond to y values in txt format. for example
x y
1 89
2 98
. .
. .
. .
2048 96
I just want to ask a question how to plot fft of these values using rectangular windowing? Please suggest the MATLAB code of this. I will be highly obliged of you because it is very important for my project.

댓글 수: 3

Rectangular window is like no window at all. So, you can plot fft using:
stem(abs(fft(y)))
Thanks Dishant for your valuable answer. Actually when i am plotting fft as you said, than i am not be able to see peaks of fft. If i am plotting fft with another software(SW 340) than i can exactly locate peaks. Please short out this problem.
Are you getting multiple peaks?? It might happen due un-coherent sampling. You must know what are spectral leakage and scalloping losses.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

질문:

2013년 7월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by