I am trying to match the functions in Fourier transform table, i.e. I am plotting one function, then I use the standard transform of that function, take the ifft and try to match with original time domain function. But, the results don't match. I also tried using ifftshift command, but that also does not help. Can you please help me out with this? For reference I am attaching my code here.
clc; clear all; close all; %% sigma=5; t=0:1:100; f1=exp((-t.^2)/(2*(sigma^2)));
for n=1:1:N-1; w(n)=2*pi*n/N; f2(n)=sigma*(sqrt(2*pi))*exp(-((sigma^2)*(w(n)^2))/2);
end f3=sigma*(sqrt(2*pi)); f4=[f3 f2]; f5=ifft(ifftshift(f4)); %% figure(1) subplot(2,1,1), plot(t,f1) subplot(2,1,2), plot(1/(N):100/(N):100,f4)