Hi. I have to calculate the inverse fourier transform of the function F in may code and compare with the original function f. The code is
w0=15; %frequencia da fonte
w=linspace(1,150,150); %vetor da frequencia
deltaw=w(2)-w(1);t=linspace(0,30,150); %vetor do tempo
alpha=0.1; %coeficiente de atenuação de sinal sísmico
for nt=1:length(t) if t(nt)>=0.0 H(nt)=1.0; %H(t) é a função de Heaviside
end if t(nt)<0.0 H(nt)=0.0; end f(nt)=H(nt)*(exp(1)^(-alpha*t(nt)))*sin((pi/180)*w0*t(nt));endfor nw=1:length(w) F(nw)=alpha/(alpha^(2)+(w(nw)+(pi/180)*w0)^(2));endA=(i*t'*w);B=exp(A);Ftempo=(1/(2*pi))*deltaw*(F*B.');plot(t,f,t,real(Ftempo))
But the graphic is not good. What I have to do?
Best Answer