Scaling problems with IFFT in Matlab
问题 I'm studying the IFFT in Matlab by applying it to a Gaussian. According to Wikipedia tables, the Fourier transform pair would be F(w) = sqrt(pi/a) * exp(-w^2/(4a)) in frequency, and f(t) = exp(-at^2) in time. I modified the code in a previous question plus Cris Luengo's answer to perform this IFFT. a = 0.333; ts = 1e4; % time sampling L = 1000*ts; % no. sample points ds = 1/ts; f = -floor(L/2):floor((L-1)/2); % freq vector f = f/ts; w = 2*pi*f; % angular freq Y = sqrt(pi/a)*exp(-w.^2/(4*a));