How to get back complete signal after doing IFFT

조회 수: 20 (최근 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