function [minu, maxu, meanu, varu] = analyse(u)

% calculates minimum, maximum, mean and variance of an image u

[h, w] = size(u);

dummy = u(2:h-1,2:w-1);

minu = min(dummy(:));
maxu = max(dummy(:));
meanu = mean(dummy(:));
varu = var(dummy(:));

disp(sprintf('minimum:\t%8.4f \n', minu));
disp(sprintf('maximum:\t%8.4f \n', maxu));
disp(sprintf('mean:\t\t%8.4f \n', meanu));
disp(sprintf('variance:\t%8.4f \n', varu));