Hi all, this is probably very trivial but I am not understanding what the source of discrepancy is:
I have a gamma distribution (h1), I take its fft and then ifft. I should get the same thing (h1), but there is a factor 2 difference. Why?
k1 = 3; theta1 = 3;
dts = 1;
ts = (0:dts:359);
Ts = length(ts);
fs_s = 1/dts;
dfs = fs_s/Ts;
f_s = (-fs_s/2:dfs:fs_s/2-dfs);
h1_s = (1/gamma(k1)) .* (ts.^(k1-1)) .* exp(-ts/theta1)/(theta1^k1);
h1_s_FT = dts*fftshift(fft(h1_s));
h1_s_hat = abs(f_s.*ifft(ifftshift(h1_s_FT)));
I am missing a factor 2 somewhere. Thanks.