Hi Aude, To construct a filter in this situation it's convenient to use a frequency array with zero frequency in the center. In one dimension the lowpass filter might look like
f = -50:49; y = exp(-f.^2/100); plot(f,y)
(it's more properly called a gaussian than an exponential). But to do an fft or an ifft, Matlab wants zero frequency at the beginning of the array, not the middle. The ifftshift function swaps halves of the y array to put zero frequency at the beginning. So
ff = 0:99; plot(ff,ifftshift(y))
puts the center of the gaussian down at zero frequency, and the negative frequency part of the gaussian into the upper half of the frequency array. Your code does the same in two dimensions.