Forum Discussion
Altera_Forum
Honored Contributor
16 years agoHi,
I am trying to use FFT Megacore function and got a different result from MATLAB Following is my code
t=0:0.001:0.127;
y=2*sin(2*pi*8*t);
Yfft=fft(y);
stem(abs(Yfft)/128);
= MegacoreFFT_VHDL_model(y,128,0);
ymega_change=abs(ymega)*2^2/128; %exponent = -2 and I normalize to 128
stem(ymega_change);
Here are the 2 graphs: 1st one is MATLAB FFT, 2nd is MegaFFT Am I making any mistakes ? http://i111.photobucket.com/albums/n126/leejongfan/FFT.jpg http://i111.photobucket.com/albums/n126/leejongfan/MegaFFT.jpg