% Illustration of zeroth element, F(1) (1D) or F(1,1) (2D), being the mean of the data plus a factor N

% 1D Example
y = 1:100
yft = fft(y);
yft(1)/100  % Zeroth Element of y
mean(y) % Mean of Data

% 2D Example
im = imread('cameraman.tif');

[N M] = size(im);
imft = fft2(im);

imft(1,1)/(N*M) % Zeroth Element of imft
mean(mean(im)) % Mean of Data

