How to get back complete signal after doing IFFT

23 ビュー (過去 30 日間)
moeen saeed
moeen saeed 2012 年 7 月 31 日
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

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 7 月 31 日
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.
  1 件のコメント
moeen saeed
moeen saeed 2012 年 7 月 31 日
hello,
In my case the original points are all real. Can you give me an example how to reconstruct the complex conjugate and then get the complete N points back. for example if i have 100 points and after doing it becomes 50. now i want to get the 100 points back so that after ifft i have the 100 points as well.
Waiting for your kind reply.
Thanks

サインインしてコメントする。


Dr. Seis
Dr. Seis 2012 年 7 月 31 日
編集済み: Dr. Seis 2012 年 7 月 31 日
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 )

Community Treasure Hunt

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

Start Hunting!

Translated by