How to use frequency as input for ifft
Show older comments
I find that I cannot input frequency as input for the funciton ifft. However, my frequency range is really large and my Y vector are corresponding to specific frequencies. How can I also include frequency as a input. Thanks
5 Comments
No can do w/ Matlab implementation; FFT and IFFT assume a fixed, constant sampling rate in the time domain which translates to a fixed df in the frequency domain.
To relate either to the actual sample rate and/or frequency requires knowing the sample rate and the FFT length going from time domain to frequency; and vice versa, that frequency resolution and length determines the transform back to time domain.
It's all just bookkeeping external entirely from the actual computation.
That's for the base form both directions; both functions do have the optional facility to interpolate/decimate the size of the result of the transform by a fixed number of elements in the output but this again presumes equi-spaced, not arbitrary time/frequency.
Whether there's a generalized form in Matlab at the File Exchange or somewhere else on the web I've not researched.
Yue Wu
on 13 Sep 2018
dpb
on 13 Sep 2018
I guess the question from this end is what is the end result you're after? If you have the FFT of a time history sampled at a given rate, the frequency resolution for it is simply Fs/L where Fs is the sampling frequency and L is the length of the FFT (which may or may not be the same as the length of the time series depending on the input to the FFT() function).
IFFT() on that FFT will return the same number of points in the time domain as were used in the input to the FFT() (including any padded zeros if L>N). The sampling frequency for that time history is still Fs just as it always was.
Only if you interpolate or decimate on the IFFT() will the sample rate also be increased/decreased on the time domain side by the ratio of that decimation/interpolation to the initial sampling frequency.
But, that sample frequency itself is just an outside piece of data that itself has no bearing on the computation of the FFT/IFFT.
Yue Wu
on 13 Sep 2018
dpb
on 13 Sep 2018
Glad to (try to :) ) help...
Accepted Answer
More Answers (0)
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!