How to get back complete signal after doing IFFT
26 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I have a signal and when i do fft i get a phase and magnitude and this phase and magnitude is half of the complete signal because of the nyquist criteria. now i change the values of the phase and wants to reconstruct the signal using IFFT. but now the signal which i get has half of the points as compare to the complete signal.
I want to ask that how i can also get the original number of points back because then my result will be more fine and accurate.
Thanks
0 comentarios
Respuestas (2)
Walter Roberson
el 31 de Jul. de 2012
When you fft() N points, you get out N points. If the original N points were all real-valued, then the N output points of fft() will be in two halves that will be complex conjugates of each other (and reversed left-to-right). Except, that is, for the first output point, which does not get included in this conj(fliplr(X)). If you know the first output value, and you know the first half segment of the output, and you know the original data was real, then you can reconstruct the complex conjugate portion prior to taking the ifft() -- but you need that complex conjugate portion to be there in order for the ifft() to function properly.
If any of the original N points were complex-valued, then you need all N points of the fft() output, as the fft() in such a case is not conjugate-symmetric.
ifft() cannot simply be applied to "the first half" of the fft() output in order to regenerate the original data, as it would not be able to distinguish that case from the case of being asked to take the inverse fft of data that was originally complex.
Dr. Seis
el 31 de Jul. de 2012
Editada: Dr. Seis
el 31 de Jul. de 2012
Can you provide an example of how you are performing the fft? Something like:
a = your_dataset_in_the_time_domain;
size_a = size(a)
b = fft(a);
size_b = size(b)
size_a should equal size_b... unless you are doing something differently. If you have N points (and N is even), then: b(1) is your amplitude at zero frequency, b(N/2+1) is your amplitude at the Nyquist, and b(2:N/2) & b(N/2+2:N) are the amplitudes for your positive & negative frequencies, respectively, where:
b(2) is equal to conj( b(N) )
b(3) is equal to conj( b(N-1) )
...
b(N/2) is equal to conj( b(N/2+2 )
0 comentarios
Ver también
Categorías
Más información sobre Transforms en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!