inverse Fourier transform without error problem
显示 更早的评论
I have a MATLAB code that i need to perform inverse fourier transform, but it does not produce any output. It appears that some data points in the frequency domain were skipped, maybe this could be the reason why MATLAB could not perform the inverse fourier transform to time domain.
please, can someone help me to resolve this issue. Pleases find below the code. Thank you in advance for your response.
clear all;close all;clc
%OBJECTIVE OF THIS CODE; Single shot characterisation of a given THZ pulse i.e. to characterize a THz pulse by using chirped pulse
N=1024*2^14;
dt=1e-14;
t=(0:N/2-1)*dt;
df=1/(N*dt);
f=(0:N/2-1)*df;w=2*pi*f;
d = 500e-6;
m=(289.27-(6*(f*1e-12).^2))./(29.16-((f*1e-12).^2));
q=real(sqrt(m));%phase index of THz radiation
s=3.2394;c=3e8;
T=0.15e-12;
first_term=exp(-(w).^2*T.^2/4).*(sqrt(2)*pi*T./(q.^2 - s^2));
second_term=0.5.*(1+ (s./q)).*(exp(i.*w.*q*d./c));
third_term=(0.5*(1- (s./q)).*exp(-i.*w.*q.*d./c));
fourth_term=exp(i.*w.*s.*d./c);
result= first_term.*(second_term + third_term - fourth_term);
RESULT=abs(result).^2;
figure(1);plot(f,RESULT);title('frequency plot')
figure(2);plot(t, ifft(RESULT));title('time plot')
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!