MATLAB: What boundary conditions does FFT and FFT2 use

fftfft2

What sort of boundary conditions is enforced by the FFT and FFT2 routines? If I specify a function only over the range n = 1 through N, does it assume the function is periodic with the function value at f(N+1) = f(1) or does it assume that the function has zero value outside of the specified domain, i.e. f(n>N) = 0 and f(n<1) = 0?

Best Answer

Periodic. Always periodic. You can determine that by using ifft with a larger number of points than were in the initial signal, and observing that the signal repeats.
Zero padding is equivalent to multiplying the function by a sinc signal.
Related Question