필터 지우기
필터 지우기

Need help with Fourier Transform fft

조회 수: 2 (최근 30일)
Mackenzie Weeks
Mackenzie Weeks 2021년 5월 24일
댓글: Mackenzie Weeks 2021년 5월 24일
clc;clear all
X = [8 9 9 6 10 2 5 6];
Y = fft(X)
Hi,
Im given an index (j) (0,1,2,3,4,5,6,7), data recorded(8,9,9,6,10,3,5,6), and DFT values (7, 0.28-1.03 i,0.5,-0.78-0.03 i,1,-0.78+.03 i,0.5,0.28+1.03i). I am supposed to test my FFT algorithm to recreate the discrete Fourier transform of this data set along with recreating the discrete fourier transform by writing a program that computes the discrete fourier transform. This is what i have so far, but its giving me the wrong DFT values
Y =
Columns 1 through 6
55.0000 + 0.0000i 2.9497 - 8.9497i 4.0000 + 1.0000i -6.9497 - 0.9497i 9.0000 + 0.0000i -6.9497 + 0.9497i
Columns 7 through 8
4.0000 - 1.0000i 2.9497 + 8.9497i
Any ideas of how to start?
Thanks in advance.
  댓글 수: 2
Paul
Paul 2021년 5월 24일
Are you sure about the problem statement? The data and the DFT values don't seem to be consistent with each other:
fft([8 9 9 6 10 3 5 6])
ans =
56.0000 + 0.0000i 2.2426 - 8.2426i 4.0000 + 0.0000i -6.2426 - 0.2426i 8.0000 + 0.0000i -6.2426 + 0.2426i 4.0000 + 0.0000i 2.2426 + 8.2426i
Mackenzie Weeks
Mackenzie Weeks 2021년 5월 24일
i accidentally typed 2 instead of 3, but even when thats chnaged its not outputting the DFT values that I'm supposed to be getting (7, 0.28-1.03 i,0.5,-0.78-0.03 i,1,-0.78+.03 i,0.5,0.28+1.03i)

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

답변 (1개)

Girijashankar Sahoo
Girijashankar Sahoo 2021년 5월 24일
MATLAB code DFT output is correct. You can varify it by first DFT value which is sum of data sequence
55=sum([8 9 9 6 10 2 5 6])
  댓글 수: 1
Mackenzie Weeks
Mackenzie Weeks 2021년 5월 24일
oh okay i see what i did wrong! I didn't normalize my data. Once i did, I got the correct DFT values. Thanks :)

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

카테고리

Help CenterFile Exchange에서 Discrete Fourier and Cosine Transforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by