Given some frequency-domain representation of an impulse response.
How does the number of frequency-domain sampling points influence the outcome of an inverse FFT, if I keep the sampling frequency constant?
Example 1 Take x(t) = e^(-t)*sin(t) for t in (0,10). Sample the signal, take its fft. Omit every second point of the fft and on the result do an inverse fft. Here is the result:
So it looks as if the frequency-domain downsampling had removed the second portion of my signal, while dividing the first part by two. (Indeed multiplying the result by two results in a curve lying exactly above the first part of the original signal.)
- Why did it remove the second part and not some arbitrary other part? I guess this is related to the second part being nearly zero everywhere, but I can't seem to find the exact reason.
- Why is the result divided by two?
- How does this generalize to other time signals?
Example 2 (pathological) Same as above, this time with a signal that is linearly decreasing from 1 to 0.1.
Now what is that?
Edit There was a mistake here: I accidentally used an uneven number of sampling points, which resulted in a complex signal after the ifft. Here is the fixed plot.
I'm interested in mathematical/theoretical as well as intuitive explanations of what's going on, as well as pointers on where to read on. I even had trouble finding a correct term for what I am doing.
Here's the R code that produced the above plots.
# First plot
t <- seq(0.01, 10, 0.01)
z <- exp(-t)*sin(t)
Z <- fft(z)/length(z)
Z2 <- Z[seq(1,length(Z),2)]
z2 <- fft(Z2, inverse=T)
plot(z)
points(Re(z2), col="red")
legend("topright", legend=c("original", "half-sampled"), fill=c("black", "red", "blue"))
# Second plot
x <- seq(1,0.101, -0.001)
X <- fft(x)/length(x)
X2 <- X[seq(1,length(X),2)]
x2 <- fft(X2, inverse=T)
plot(x)
points(Re(x2), col="red")
legend("topright", legend=c("original", "half-sampled"), fill=c("black", "red", "blue"))