right way of performing inverse FFT in MATLAB?

纵饮孤独 提交于 2019-12-23 22:04:22

问题


I've red through the matlabcentral discussion on fftshift and ifftshift but I don't understand completely what's the right thing to do for me. A bit more helpful for one aspect is this answer on stackoverflow.

I have an array A with (equally-spaced) angular frequencies in the first column and the corresponding intensities in the second column. It has an arbitrary length (can be odd or even). It does not start with zero frequency, but essentially, I am interested in a time-shift tau of an interferometer which causes a spectral modulation cos(omega*tau+phi) (where omega is the angular frequency and phi a phase). I am interested in the phase, too. At least in the relative phase compared to other measurements.

Now, my questions are the following

  1. Do I have to add values down to zero frequency?
    • a) If so, where would I get them from? I can't simply insert zeros. To my understanding, I can just ignore it (basically shift the frequencies by the minimum frequency value in the data) and then get the phase wrong.
    • b) If I perform this shift (i.e. if I just don't care), and do this for multiple measurements, but each time by the same amount (i.e. all start at the same frequency), will the relative phase information keep unchanged? Intuitively, I think yes.
  2. What about negative frequencies that would actually appear in a Fourier transform? How do I deal with the fact that I'm lacking those? A constists of only real values
  3. if I want the result with zero time delay centered, which of the following should I perform?
    • I would choose fftshift(ifft(ifftshift(A(:,2)))) as suggested by the first posting
    • ifft(ifftshift(A(:,2))) (as far as I understood this gives me a shifted output)
    • ifft(A(:,2)) (this should give me a shifted output with the wrong phase)
    • even something else?
  4. As I am using the angular frequency, do I need to multiply the values in my time delay vector by 2*pi? I would construct it the following way:
    • (-length(A(:,1)):length(A(:,1))-1)/(2*length(A(:,1))*(A(2,1)-A(1,1))) or simpler (-L:L-1)/(2*L*D) where L=length(A(:,1)) is the length of my frequency array and D=A(2,1)-A(1,1) is the frequency resolution

Sorry that there are so many questions but I am really confused and the matlab documentation is no real help in this case.

来源:https://stackoverflow.com/questions/35899611/right-way-of-performing-inverse-fft-in-matlab

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!