fourier transform space dependent function
조회 수: 1(최근 30일)
I am calculating the inverse Fourier transform of the equations below. alpha and beta are two frequency dependent constants. z is the space dimension. I write the Matlab code, however, the answer I got for P(t,z) doesn't make sense. can you please check my program to do inverse Fourier transform.
alpha= 5; %[Neper/cm]
% alpha=((3.2*10^-14).*f.^2) + 5;
Bjorn Gustavsson 2017년 2월 23일
You shouldn't do the inverse Fourier transform element by element. The inverse Fourier transform should be calculated in the frequency direction for each z-coordinate. You can do that in one loop over i (I'd suggest you stop using i and j as indices and start using better named loop-variables such as i_z and i_f, then you can use i and j as sqrt(-1) and you'll have better grasp of what each loop-index is) or you could use the ifft command in one go on the whole matrix. You should look at the documentation to see what the calling syntax is when you want the 1-D Fourier transform in one direction. Also you should remember to use fftshift after the ifft.