time signal to fft and back ifft
Mostra commenti meno recenti
Hi there
I am using a time series and calculating fft using example provided by MATLAB
L = length(b);
NFFT = 2^nextpow2(L);
y = fft(b, NFFT)/L;
f= Fs/2*linspace(0,1,NFFT/2);
But when i use inverse fourier transform ifft, i do not get real values, i get complex values and the result is not same as the original signal b. I am using y_source = ifft(X,NFFT);
y_source is not same as original signal b.
Could anyone please answer this. Thanks
2 Commenti
Atul
il 2 Mag 2012
Daniel Shub
il 2 Mag 2012
You need to be careful that you keep symmetry. You haven't shown us how you "mute" the values.
Risposte (3)
Wayne King
il 4 Giu 2013
Note sure why you're dividing by the length of the signal and padding the DFT AND expecting to get the signal back.
t = 0:0.001:1-0.001;
x = cos(2*pi*100*t);
xdft = fft(x);
xhat = ifft(xdft);
max(abs(x-xhat))
ANDRIAMANANTENA Laza
il 4 Giu 2013
Hello, I have the same problem with my handling and it blocks the rest of my code.
my y signal is
y=sin(2*pi*500*t) with t=linspace(0,5/Fs,5) Fs=44100
When I proceed with fft like
YF= fft(y,NFFT)/length(y)
and try to recover my original signal with
y2=ifft(YF,NFFT,'symmetric')
I don't have the original signal
Atul
il 5 Giu 2013
0 voti
Categorie
Scopri di più su Transforms in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!