Why i can't take an FFT on MATLAB for a sampled signal ?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello everyone This is my first post on Mathworks community , i would like to ask something about the FFT function on MATLAB . I have the MATLAB 2016b , and i have a sampled sin waveform comes from an ADC on FPGA board . After i extracted these data of sampled sine i plotted it on MATLAB and i've tried to take its FFT as well , but unfortunately i got no results for the FFT of this sine , i tried it many times with many different frequencies but they all gives the same results which is shown on the picture below, just a peaks at the beginning and the end of the frame. I wonder what's wrong for taking the FFT of this signal and how can i fix it , take in account that the sampling frequency of my ADC is about 1MSPS while the max carrier frequency of my sine signal was just 480 KHz, the signal that shown on pic below has 100 Khz frequency . If some one knows what's going on here and how it can be fixed i would really appreciate the help . Thanks. Greetings. Muhamed.
댓글 수: 0
채택된 답변
Image Analyst
2016년 12월 20일
I don't see anything wrong with it. You might call fftshift() if you want the DC location to be at the center of the plot instead of at both ends like fft algorithm does it. And you might calibrate your x axis if you want it in time and frequency instead of elements and inverse elements. I have a demo for doing all that but it's on my other computer. Let me know if you need it and I can get it later today or tomorrow.
댓글 수: 2
추가 답변 (2개)
Star Strider
2016년 12월 20일
You are calculating the Fourier transform correctly, and your plot is of the full two-sided result. I recommend the R2015a documentation for fft (link). Specifically note the code between the first (top) two plot figures.
참고 항목
카테고리
Help Center 및 File Exchange에서 Bartlett에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!