How to implement ifft?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
bazrafshan88@gmail.com
el 15 de Jul. de 2015
Editada: bazrafshan88@gmail.com
el 16 de Jul. de 2015
Dear all
I have been having a big problem understanding the concept of numerical ifft. Consider a function in spatial domain like f(x)=-2/pi*Ln(abs(x)) for -Lx<x<Lx. The fourier transform of this function is F(w)=2/abs(w). I want to figure out whether these two are numerically the same using ifft command in Matlab. If you run the simple code below, you will see the difference that bothers me:
clc
clear all
Lx=0.0005;
N=pow2(10);
dx=2*Lx/(N-1);
w=pi/(N*dx)*linspace(-N/2,N/2,N);
Hw=2./abs(w);
hx=1/dx*abs(fftshift(ifft(Hw)));
x=linspace(-Lx,Lx,N);
hxexact=-2/pi.*log(abs(x));
plot(x,hx,x,hxexact,'r')
legend('ifft','exact')
I would appreciate that if anyone could help me with this.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!