How to do ifft to data derived in frequency domain

9 ビュー (過去 30 日間)
Takis
Takis 2014 年 11 月 10 日
回答済み: Takis 2014 年 11 月 12 日
Hello everybody,
I have some signal values derived in the frequency domain and I would like to derive also the corresponding values in time domain. Which is the best way to do it using the ifft matlab function?
Thanks in advance. Pete
  1 件のコメント
Dishant Arora
Dishant Arora 2014 年 11 月 10 日
Please elaborate what you want to do, what do you mean by best way? There's a one to one correspondence between fft and it's inverse, so just take inverse using ifft.

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

採用された回答

Eric
Eric 2014 年 11 月 10 日
編集済み: Eric 2014 年 11 月 10 日
I'm going to assume you have a vector f which is the frequency sampling vector and a signal s. Assuming s is in a centered coordinate system you can use the following:
assert(length(f)==length(s),'Lengths are not the same!');
delta_t = 1/(max(f)-min(f));
N = length(f);
t = (-fix(N/2):fix((N-1)/2)) * delta_t;%Works whether N is odd or even
g = fftshift(ifft(ifftshift(s)))*sqrt(numel(s));
The idea with the temporal sampling vector t is that the sampling width in the temporal domain is equal to the reciprocal of the length of the signal in the frequency domain. You then need to construct a vector t with that sampling such that the appropriate element is zero. When N is odd then the zero element is in the middle. When N is even the N/2 + 1 element is zero (i.e., there is one more negative value than positive).
The multiplication by sqrt(numel(s)) ensures that energy is conserved (see Parseval's Theorem). This normalization factor is dependent upon the particular definition Matlab uses for ifft. Other software platforms will require different normalization factors.
See my answer at http://www.mathworks.com/matlabcentral/answers/158434-about-frequency-in-fft for why I use the fftshift and ifftshift in this manner. The short answer is that, for the case where you're working in centered coordinate systems, it provides the correct phase.
Good luck,
Eric

その他の回答 (1 件)

Takis
Takis 2014 年 11 月 12 日
Actually I'm using a numerical model that returns the signal values for distinct frequency values in a specific band. There is no fft involved in the procedure and that makes me feel uncomfortable in inverting the signal to the time domain. I think that Eric's answer solves my problem.

カテゴリ

Help Center および File ExchangeDiscrete Fourier and Cosine Transforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by