How to get back complete signal after doing IFFT
조회 수: 22 (최근 30일)
이전 댓글 표시
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
답변 (2개)
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.
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 )
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Transforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!