Clear Filters
Clear Filters

Please, help me. How can I calculate the inverse fourier transform without use the ifft function?

6 views (last 30 days)
Hi. I have one function in frequency domain and I have to calculate the response in the time domain. The problem is that I don't have the function in time domain to compare. I don't know what is the relationship between the vector of frequencies that I am working and the vector of time that I'll have my response. I'd like to have the response in real time and not constructed about a number of points in vector of time.
Then, I have one vector of positive frequencies and one function discretized for this frequencies and I have to transform this response to time domain.
I need help. Please, try to help me. Thanks.

Accepted Answer

Wayne King
Wayne King on 22 Mar 2013
Edited: Wayne King on 22 Mar 2013
If you have the discrete Fourier transform for the positive frequencies as a vector in MATLAB, then (if the signal is real-valued), you can obtain the inverse DFT. Of course you will need to know the sampling frequency to provide a meaningful time vector.
Just to show you:
Fs = 1000;
t = 0:0.001:1-0.001;
x = cos(2*pi*100*t)+randn(size(t));
xdft = fft(x);
Now I'll just pretend I'm starting with the positive frequencies of xdft
ydft = xdft(1:length(x)/2+1);
% for even length ydft
N = length(ydft);
ydft(N+1:2*N-2) = fliplr(conj(ydft(2:N-1)));
sig = ifft(ydft);
Now note that x and sig are equal
max(abs(x-sig))
  1 Comment
Marcia Azeredo
Marcia Azeredo on 26 Mar 2013
Thanks. But, can I use this code in my case? Because, in my code I don't have the function in time domain to compare, in other words, I don't have the function x showed in this exemple.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!