Help with using IFFT to calculate radial distribution function g(r) ! PLEASE help
이전 댓글 표시
Hi all, I am trying to use ifft function to evaluate the radial distribution function g(r), r is distance (nm), by using the structure factor s(q) , which is function of wave vector q (1/nm) :

I did this by using normal integration (quad) but it takes long time to calculate it. So I believe I can use ifft to do this since the function s(q) is a discrete function.
I do not know what input I have to use in ifft() ? do I have to put q*s(q) ? what about sin (q r) ? Is it just : image (ifft()) ? Do I have to take in my account Nyquist frequency in my data ?
I am sorry there are too many questions but I am REALLY confused ):
Any help will be appreciated!
Thanks a lot .
댓글 수: 2
Youssef Khmou
2013년 3월 24일
편집: Youssef Khmou
2013년 3월 24일
hi, did you try other functions /methods for intergating : "trapz" as example ?
I think FFT/iFFT would be a good choice if the equation has convolution then in frequency domain it becomes simple produc .
talaab
2013년 3월 24일
답변 (1개)
Youssef Khmou
2013년 3월 24일
편집: Youssef Khmou
2013년 3월 24일
can you try "trapz" as example ?
r=(0:0.1:2)*1e-9; % distance in NM
rho=5e-3; % charge density maybe .
K=1./(2*pi^2*r*rho); % factor
q_max=1;
N=length(r);
q=linspace(0,q_max,N); % wave factor .
sq=2*q; % example of the structure factor
f=q.*sq.*sin(q.*r); % the function
F=trapz(q,f);
F=F*K;
g=1+F;
figure, plot(r,g), title(' RADIAL FUNCTION'), grid on
xlabel(' Distance (m)'), ylabel(' magnitude');
In the program, we choose the radius so start from the origin, so the plot G(r) makes sens as we move forward, the distribution function decreases .
waiting for others users to clarify the use of FFT/IFFT....
댓글 수: 1
카테고리
도움말 센터 및 File Exchange에서 Fast Fourier Transforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!